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
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
|
// this line is out of the if so upper and lower textures can be hit by a splat
|
||||||
blockingline = ld;
|
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 (!ld->backsector) // one sided line
|
||||||
{
|
{
|
||||||
if (P_PointOnLineSide(tmthing->x, tmthing->y, ld))
|
if (P_PointOnLineSide(tmthing->x, tmthing->y, ld))
|
||||||
|
@ -1987,18 +2000,7 @@ static boolean PIT_CheckLine(line_t *ld)
|
||||||
|
|
||||||
if (lowfloor < tmdropoffz)
|
if (lowfloor < tmdropoffz)
|
||||||
tmdropoffz = lowfloor;
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue