mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-30 13:10:55 +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;
|
break;
|
||||||
}
|
}
|
||||||
// Ignore popped monitors, too.
|
// Ignore popped monitors, too.
|
||||||
if (node->m_thing->flags & MF_MONITOR
|
if (node->m_thing->health == 0 // this only really applies for monitors
|
||||||
&& node->m_thing->threshold == 68)
|
|| (!(node->m_thing->flags & MF_MONITOR) && (mobjinfo[node->m_thing->type].flags & MF_MONITOR))) // gold monitor support
|
||||||
continue;
|
continue;
|
||||||
// Okay, we found something valid.
|
// Okay, we found something valid.
|
||||||
if (!thing // take either the first thing
|
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"
|
S_StartSound(puncher, sfx_mario9); // Puncher is "close enough"
|
||||||
}
|
}
|
||||||
|
|
||||||
if (itsamonitor)
|
if (itsamonitor && thing)
|
||||||
{
|
{
|
||||||
P_UnsetThingPosition(tmthing);
|
P_UnsetThingPosition(thing);
|
||||||
tmthing->x = oldx;
|
thing->x = oldx;
|
||||||
tmthing->y = oldy;
|
thing->y = oldy;
|
||||||
tmthing->z = oldz;
|
thing->z = oldz;
|
||||||
tmthing->momx = 1;
|
thing->momx = 1;
|
||||||
tmthing->momy = 1;
|
thing->momy = 1;
|
||||||
P_SetThingPosition(tmthing);
|
P_SetThingPosition(thing);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue