mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-29 12:40:58 +00:00
A fix for the thing where you can get stuck inside a Mario block that has a monitor in it.
This commit is contained in:
parent
71b7db4e0d
commit
dff9209bd2
1 changed files with 10 additions and 10 deletions
|
@ -1782,8 +1782,8 @@ static mobj_t *SearchMarioNode(msecnode_t *node)
|
|||
break;
|
||||
}
|
||||
// Ignore popped monitors, too.
|
||||
if (node->m_thing->flags & MF_MONITOR
|
||||
&& node->m_thing->threshold == 68)
|
||||
if (node->m_thing->health == 0 // this only really applies for monitors
|
||||
|| (!(node->m_thing->flags & MF_MONITOR) && (mobjinfo[node->m_thing->type].flags & MF_MONITOR))) // gold monitor support
|
||||
continue;
|
||||
// Okay, we found something valid.
|
||||
if (!thing // take either the first thing
|
||||
|
@ -3156,15 +3156,15 @@ INT32 EV_MarioBlock(sector_t *sec, sector_t *roversector, fixed_t topheight, mob
|
|||
S_StartSound(puncher, sfx_mario9); // Puncher is "close enough"
|
||||
}
|
||||
|
||||
if (itsamonitor)
|
||||
if (itsamonitor && thing)
|
||||
{
|
||||
P_UnsetThingPosition(tmthing);
|
||||
tmthing->x = oldx;
|
||||
tmthing->y = oldy;
|
||||
tmthing->z = oldz;
|
||||
tmthing->momx = 1;
|
||||
tmthing->momy = 1;
|
||||
P_SetThingPosition(tmthing);
|
||||
P_UnsetThingPosition(thing);
|
||||
thing->x = oldx;
|
||||
thing->y = oldy;
|
||||
thing->z = oldz;
|
||||
thing->momx = 1;
|
||||
thing->momy = 1;
|
||||
P_SetThingPosition(thing);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue