mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-03-21 18:32:08 +00:00
Move MobjLineCollide up a bit to where we first know for sure that we hit a line
This commit is contained in:
parent
ef4840555e
commit
ad610ba4aa
1 changed files with 14 additions and 12 deletions
26
src/p_map.c
26
src/p_map.c
|
@ -1943,6 +1943,19 @@ static boolean PIT_CheckLine(line_t *ld)
|
|||
|
||||
// this line is out of the if so upper and lower textures can be hit by a splat
|
||||
blockingline = ld;
|
||||
|
||||
#ifdef HAVE_BLUA
|
||||
{
|
||||
UINT8 shouldCollide = LUAh_MobjLineCollide(tmthing, blockingline); // checks hook for thing's type
|
||||
if (P_MobjWasRemoved(tmthing))
|
||||
return true; // one of them was removed???
|
||||
if (shouldCollide == 1)
|
||||
return false; // force collide
|
||||
else if (shouldCollide == 2)
|
||||
return true; // force no collide
|
||||
}
|
||||
#endif
|
||||
|
||||
if (!ld->backsector) // one sided line
|
||||
{
|
||||
if (P_PointOnLineSide(tmthing->x, tmthing->y, ld))
|
||||
|
@ -1987,18 +2000,7 @@ static boolean PIT_CheckLine(line_t *ld)
|
|||
|
||||
if (lowfloor < tmdropoffz)
|
||||
tmdropoffz = lowfloor;
|
||||
|
||||
#ifdef HAVE_BLUA
|
||||
{
|
||||
UINT8 shouldCollide = LUAh_MobjLineCollide(tmthing, ld); // checks hook for thing's type
|
||||
if (P_MobjWasRemoved(tmthing))
|
||||
return true; // one of them was removed???
|
||||
if (shouldCollide == 1)
|
||||
return false; // force collide
|
||||
else if (shouldCollide == 2)
|
||||
return true; // force no collide
|
||||
}
|
||||
#endif
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue