mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Fix passing tripwire not triggering SOMETIMES
This commit is contained in:
parent
9750e2cd07
commit
332d3bfa12
1 changed files with 9 additions and 13 deletions
18
src/p_map.c
18
src/p_map.c
|
|
@ -206,11 +206,14 @@ static void add_spechit(line_t *ld)
|
|||
numspechit++;
|
||||
}
|
||||
|
||||
static boolean P_SpecialIsLinedefCrossType(UINT16 ldspecial)
|
||||
static boolean P_SpecialIsLinedefCrossType(line_t *ld)
|
||||
{
|
||||
boolean linedefcrossspecial = false;
|
||||
|
||||
switch (ldspecial)
|
||||
if (P_IsLineTripWire(ld))
|
||||
return true;
|
||||
|
||||
switch (ld->special)
|
||||
{
|
||||
case 2001: // Finish line
|
||||
case 2003: // Respawn line
|
||||
|
|
@ -1671,8 +1674,7 @@ static boolean PIT_CheckLine(line_t *ld)
|
|||
tmdropoffz = lowfloor;
|
||||
|
||||
// we've crossed the line
|
||||
if (P_SpecialIsLinedefCrossType(ld->special) ||
|
||||
P_IsLineTripWire(ld))
|
||||
if (P_SpecialIsLinedefCrossType(ld))
|
||||
{
|
||||
add_spechit(ld);
|
||||
}
|
||||
|
|
@ -2665,14 +2667,11 @@ boolean P_TryMove(mobj_t *thing, fixed_t x, fixed_t y, boolean allowdropoff)
|
|||
side = P_PointOnLineSide(thing->x, thing->y, ld);
|
||||
oldside = P_PointOnLineSide(oldx, oldy, ld);
|
||||
if (side != oldside)
|
||||
{
|
||||
if (ld->special)
|
||||
{
|
||||
P_CrossSpecialLine(ld, oldside, thing);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
@ -2751,7 +2750,7 @@ static boolean PTR_GetSpecialLines(intercept_t *in)
|
|||
return true;
|
||||
}
|
||||
|
||||
if (P_SpecialIsLinedefCrossType(ld->special))
|
||||
if (P_SpecialIsLinedefCrossType(ld))
|
||||
{
|
||||
add_spechit(ld);
|
||||
}
|
||||
|
|
@ -2820,14 +2819,11 @@ void P_HitSpecialLines(mobj_t *thing, fixed_t x, fixed_t y, fixed_t momx, fixed_
|
|||
side = P_PointOnLineSide(x + momx, y + momy, ld);
|
||||
oldside = P_PointOnLineSide(x, y, ld);
|
||||
if (side != oldside)
|
||||
{
|
||||
if (ld->special)
|
||||
{
|
||||
P_CrossSpecialLine(ld, oldside, thing);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// P_ThingHeightClip
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue