bradharding / doomretro

The classic, refined DOOM source port. For Windows PC.
https://www.doomretro.com
GNU General Public License v3.0
714 stars 89 forks source link

A_LineEffect treated differently than in other ports #858

Closed KLNeidecker closed 1 month ago

KLNeidecker commented 1 month ago

Hey!

So, A_LineEffect in Retro will continue parsing further A_LineEffects even if it hits an S1 or W1 trigger.

I used a few which allowed a chain of effects to occur on Retro, but testing on other ports...they froze. When I looked into it, it seems that is how it is supposed to happen: hitting a w1/s1 is supposed to nullify all other A_LineEffect calls, perhaps to allow "if-then" style statements, if this event happens then all others don't, or somesuch.

According to the MBF specs:

A_LineEffect allows activation of remote linedef effects by objects. misc1 ("Unknown 1") indicates the linedef type, while misc2 ("Unknown 2") indicates the sector tag. The tagged sector(s) are activated as though a player has activated a linedef of the indicated type and tag. If the linedef is a S1 or W1 type, then the effect blocks out all further A_LineEffect effects for the object, no matter whether they are S1/W1 or SR/WR types.

Now, personally, I don't see the use of this, but it may be that some dehacked mods rely on such behavior. Certainly confused me when my cool multi-line effect didn't work in Woof or GZDoom, but worked perfectly in Retro, until I decided... let's use SR triggers instead of S1 triggers, which then suddenly worked.

Example this should work on all ports. All SR or WR triggers.

YKEY A 1 A_PlaySound(EVILSC, 0)     // Evil scream
YKEY A 1 A_RadiusDamage(10, 128)    // Hurt player
YKEY A 1 A_LineEffect(16187, 16)    // Nasty door opening surprise
YKEY A 1 A_LineEffect(25051, 9)     // Trick floor move for "changing" tvs
YKEY A 1 A_LineEffect(16475, 11)    // Raise trap ceiling to allow sounds to move
YKEY A 1 A_LineEffect(139, 13)      // Darkness
YKEY A 1 A_LineEffect(193, 14)      // Start blinking hall
YKEY A 1 A_LineEffect(193, 9)       // Patch for microsectors included above
YKEY A 1 A_LineEffect(16923, 15)    // Close windows
YKEY A 1 A_NoiseAlert()             // Wakey wakey, eggs and bakey
goto done

But let's say YKEY A 1 A_LineEffect(16187, 16) was instead YKEY A 1 A_LineEffect(16186, 16) which is s1 instead of a sr... then it is supposed to not process any other A_LineEffects in that object from that point on.

But in Retro it continues processing the rest, which may break some dehacked patches.