Added quick validity checks for three linedef executor specials that require a player mobj to be the triggerer (432, 434 and 437)

This commit is contained in:
Monster Iestyn 2019-08-20 20:31:28 +01:00
parent 7f5034bb75
commit eacc589ae1

View file

@ -3096,7 +3096,7 @@ static void P_ProcessLineSpecial(line_t *line, mobj_t *mo, sector_t *callsec)
break;
case 432: // Enable 2D Mode (Disable if noclimb)
if (mo->player)
if (mo && mo->player)
{
if (line->flags & ML_NOCLIMB)
mo->flags2 &= ~MF2_TWOD;
@ -3122,7 +3122,7 @@ static void P_ProcessLineSpecial(line_t *line, mobj_t *mo, sector_t *callsec)
break;
case 434: // Custom Power
if (mo->player)
if (mo && mo->player)
{
mobj_t *dummy = P_SpawnMobj(mo->x, mo->y, mo->z, MT_NULL);
@ -3205,7 +3205,7 @@ static void P_ProcessLineSpecial(line_t *line, mobj_t *mo, sector_t *callsec)
break;
case 437: // Disable Player Controls
if (mo->player)
if (mo && mo->player)
{
UINT16 fractime = (UINT16)(sides[line->sidenum[0]].textureoffset>>FRACBITS);
if (fractime < 1)