Skip to content

UDMF: Linedef executor triggers

MascaraSnake requested to merge udmf-executor-triggers into next

Based on !1625 (merged), merge that one first.

This branch adapts the "trigger linedef executor" linedef types (3xx) to UDMF. The trigger sector types haven't been changed yet - that's for later.

Overview:

  • If you're wondering why the trigger linedefs don't have any args to specify the tag of the trigger sector, that's because it works the other way around. In-game, the trigger linedef doesn't call the trigger sector - the trigger sector calls the trigger linedef when a player enters/touches it. Right now, you put the tag of the trigger linedef into the tag field of the trigger sector, just like you would in the binary format. Later on, when I start adapting the sector types, I will add a triggertag sector field to specify the tag of the trigger linedef.
  • The trigger type (once/continuous/each time) is set via the linedef's arg0 instead of the linedef type. This means that UDMF supports combinations that binary doesn't (for example, ring count + each time).
  • The "emerald check" and "NiGHTS mare" sector types are now deprecated and have been replaced with new linedef types (337-342).
  • I had to reorganize a lot of the sector type triggering code to make this work, so I took the opportunity to clean up that section of the code and fix some bugs and inconsistencies:
    • For sectors with the "all players" trigger type, the players no longer have to be in that specific sector - it also works if they're in other sectors that have the same tag. The "each time" triggers already worked like this before, but the "once/continuous" ones didn't.
    • Bots no longer count towards all players + each time triggers.
    • Dead players no longer count towards all players + once/continuous triggers.
    • "Each time" triggers now support polyobjects.
    • Combining an "anywhere in sector" special with a "floor touch" special (e.g., space countdown + floor touch trigger) no longer corrupts the "floor touch" special.

Known issues:

  • If you combine the "all players" trigger type with a multitagged trigger linedef (which you probably shouldn't do anyway), you get slightly different behavior if it's an "each time" trigger than if it's "once/continuous". Let's say you have two sectors with the "all players" trigger type: sector X with tag 1 and sector Y with tag 2. They're hooked up to a trigger linedef Z with tags 1 and 2. If it's a once/continuous trigger type, it only triggers if everyone is in sector X or everyone is in sector Y. If it's an each time type, it also triggers if some players are in X and the rest in Y. This isn't a new issue - it's always been this way. But unlike the other inconsistencies between each time and once/continuous, this one would have been tedious and expensive to fix, so I decided to leave it as is.

srb2win-triggers.exe

Edited by MascaraSnake

Merge request reports

Loading