mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-29 12:40:58 +00:00
Make the crumble check account for slopes for... some reason
This commit is contained in:
parent
3d2b71b24c
commit
e24595ed52
1 changed files with 6 additions and 2 deletions
|
@ -4077,6 +4077,7 @@ static void P_PlayerMobjThinker(mobj_t *mobj)
|
|||
// Crumbling platforms
|
||||
for (node = mobj->touching_sectorlist; node; node = node->m_snext)
|
||||
{
|
||||
fixed_t topheight, bottomheight;
|
||||
ffloor_t *rover;
|
||||
|
||||
for (rover = node->m_sector->ffloors; rover; rover = rover->next)
|
||||
|
@ -4084,8 +4085,11 @@ static void P_PlayerMobjThinker(mobj_t *mobj)
|
|||
if (!(rover->flags & FF_EXISTS) || !(rover->flags & FF_CRUMBLE))
|
||||
continue;
|
||||
|
||||
if ((*rover->topheight == mobj->z && !(mobj->eflags & MFE_VERTICALFLIP))
|
||||
|| (*rover->bottomheight == mobj->z + mobj->height && mobj->eflags & MFE_VERTICALFLIP)) // You nut.
|
||||
topheight = P_GetFOFTopZ(mobj, node->m_sector, rover, mobj->x, mobj->y, NULL);
|
||||
bottomheight = P_GetFOFBottomZ(mobj, node->m_sector, rover, mobj->x, mobj->y, NULL);
|
||||
|
||||
if ((topheight <= mobj->z + 16*mobj->scale && topheight >= mobj->z && !(mobj->eflags & MFE_VERTICALFLIP))
|
||||
|| (bottomheight >= mobj->z + mobj->height && bottomheight <= mobj->z + mobj->height - 16*mobj->scale && mobj->eflags & MFE_VERTICALFLIP)) // You nut.
|
||||
EV_StartCrumble(rover->master->frontsector, rover, (rover->flags & FF_FLOATBOB), mobj->player, rover->alpha, !(rover->flags & FF_NORETURN));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue