Don't hitlag tripwire when passing above

This commit is contained in:
James R 2022-08-01 07:17:40 -07:00
parent f52afc0491
commit d11179d9aa

View file

@ -263,9 +263,6 @@ static boolean P_SpecialIsLinedefCrossType(line_t *ld)
{
boolean linedefcrossspecial = false;
if (P_IsLineTripWire(ld))
return true;
switch (ld->special)
{
case 2001: // Finish line
@ -1675,6 +1672,20 @@ static BlockItReturn_t PIT_CheckLine(line_t *ld)
{
add_spechit(ld);
}
else if (P_IsLineTripWire(ld))
{
fixed_t textop, texbottom;
P_GetMidtextureTopBottom(ld, tmx, tmy,
&textop, &texbottom);
/* The effect handling is done later but it won't
know the height values anymore. So don't even add
this line to the list unless this thing clips the
tripwire's midtexture. */
if (tmthing->z <= textop && thingtop >= texbottom)
add_spechit(ld);
}
return BMIT_CONTINUE;
}