mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-15 09:11:48 +00:00
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:
parent
7f5034bb75
commit
eacc589ae1
1 changed files with 3 additions and 3 deletions
|
@ -3096,7 +3096,7 @@ static void P_ProcessLineSpecial(line_t *line, mobj_t *mo, sector_t *callsec)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 432: // Enable 2D Mode (Disable if noclimb)
|
case 432: // Enable 2D Mode (Disable if noclimb)
|
||||||
if (mo->player)
|
if (mo && mo->player)
|
||||||
{
|
{
|
||||||
if (line->flags & ML_NOCLIMB)
|
if (line->flags & ML_NOCLIMB)
|
||||||
mo->flags2 &= ~MF2_TWOD;
|
mo->flags2 &= ~MF2_TWOD;
|
||||||
|
@ -3122,7 +3122,7 @@ static void P_ProcessLineSpecial(line_t *line, mobj_t *mo, sector_t *callsec)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 434: // Custom Power
|
case 434: // Custom Power
|
||||||
if (mo->player)
|
if (mo && mo->player)
|
||||||
{
|
{
|
||||||
mobj_t *dummy = P_SpawnMobj(mo->x, mo->y, mo->z, MT_NULL);
|
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;
|
break;
|
||||||
|
|
||||||
case 437: // Disable Player Controls
|
case 437: // Disable Player Controls
|
||||||
if (mo->player)
|
if (mo && mo->player)
|
||||||
{
|
{
|
||||||
UINT16 fractime = (UINT16)(sides[line->sidenum[0]].textureoffset>>FRACBITS);
|
UINT16 fractime = (UINT16)(sides[line->sidenum[0]].textureoffset>>FRACBITS);
|
||||||
if (fractime < 1)
|
if (fractime < 1)
|
||||||
|
|
Loading…
Reference in a new issue