Skip to content
Snippets Groups Projects

Add linedef specials for multitagging in binary maps

Merged Vincent Robinson requested to merge v-rob/SRB2:binary-multitagging into next

Adds three new linedef types:

  • 97: Apply Tag to Front Sector
  • 98: Apply Tag to Back Sector
  • 99: Apply Tag to Front and Back Sectors

Each type adds the tag specified in the tag field to the specified sector's list of tags. It makes overlapping FOF's sooo much nicer to set up.

The attached testing file has two rooms, on of which uses these linedef types and the other which uses normal tags. apply.wad The benefits, I think, speak for themselves.

(In addition, multitagging allocated twice the amount of memory that was necessary, that is, sizeof(list->tags) [a pointer] instead of sizeof(mtag_t) [a 16 bit integer]. I fixed this.)

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • You absolute madlad. I can't even begin to describe how fucking cool and useful this is. You've earned my respect as a mapper.

  • added Enhancement label

  • added Feature label

  • merged

  • sphere mentioned in commit 44f3edb2

    mentioned in commit 44f3edb2

  • This is something I just thought of, and I'm so glad it's been implemented already, even if it won't be in production until 2.2.10. Seriously, it's such an elegant way of setting multiple tags on a sector, that I'm surprised it hasn't already been a thing for a long time.

    Expanding on this idea, another thing that I think would be valuable would be to apply additional tags to all sectors with a certain tag, instead of having to use each target sector's own linedefs. Let's say you have a room full of FOF's, and you want to apply altered gravity, a colormap, and a pulsating light effect, to the entire room.

    Currently, the best way to do this (that I'm aware of, anyway) would be to create a control sector with 3×(n+1) linedefs, where n is, at minimum, the number of FOF's in the room. And for each of those effects, you'd need to set its parameters on n+1 separate linedefs, one for each tag, which makes tweaking the effects a huge pain.

    It should go without saying that these new linedef types (99 especially) will make this a lot more straightforward. But you'd still need to apply these tags to three linedefs on every sector in the room, so there's still room for improvement. So I'm suggesting a fourth linedef special: "96 - Apply Tag to Tagged Sectors". This would essentially do the reverse of "Apply Tag to Front Sector", in that it will take the front sector's tag, and apply it to all sectors that have the linedef's tag. This way, you could apply the effects to a control sector, and use the control sector's linedefs to specify tags which should receive the effects. In fact, each linedef could contain up to five different tags, by using the texture offsets.

    Maybe 97-99 could also let you specify up to five tags in this way. Of course, this should be optional, because most likely you'd already be using the texture offsets as, well, texture offsets. But if the target sector is an FOF control sector or something, or the texture offsets otherwise don't matter on one or both sidedefs, it could be useful. We'd need two flags that are otherwise unused (one for each sidedef) and I imagine "Effect 6" and "Transfer Line" would be suitable flags for this purpose, since from my understanding neither of them would otherwise have any meaning on a linedef with tag 97-99.

    I'm going to try and implement these features myself, and submit my own merge request. Done; see !1524 (merged).

    Edited by Sparkette
  • Sparkette mentioned in merge request !1524 (merged)

    mentioned in merge request !1524 (merged)

  • sphere mentioned in commit d040b61e

    mentioned in commit d040b61e

  • sphere changed milestone to %2.2.10

    changed milestone to %2.2.10

  • added Wiki to-do label

Please register or sign in to reply
Loading