mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-15 01:01:33 +00:00
Update mobj floorz/ceilingz after FOF destruction
This commit is contained in:
parent
b5c3b30f13
commit
1a6e48de1e
1 changed files with 14 additions and 0 deletions
|
@ -1212,6 +1212,19 @@ static boolean T_SectorHasEnemies(sector_t *sec)
|
|||
return false;
|
||||
}
|
||||
|
||||
static void T_UpdateMobjPlaneZ(sector_t *sec)
|
||||
{
|
||||
msecnode_t *node = sec->touching_thinglist; // things touching this sector
|
||||
mobj_t *mo;
|
||||
while (node)
|
||||
{
|
||||
mo = node->m_thing;
|
||||
mo->floorz = P_FloorzAtPos(mo->x, mo->y, mo->z, mo->height);
|
||||
mo->ceilingz = P_CeilingzAtPos(mo->x, mo->y, mo->z, mo->height);
|
||||
node = node->m_thinglist_next;
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// T_NoEnemiesThinker
|
||||
//
|
||||
|
@ -1938,6 +1951,7 @@ void EV_CrumbleChain(sector_t *sec, ffloor_t *rover)
|
|||
// no longer exists (can't collide with again)
|
||||
rover->fofflags &= ~FOF_EXISTS;
|
||||
rover->master->frontsector->moved = true;
|
||||
T_UpdateMobjPlaneZ(sec); // prevent objects from floating
|
||||
P_RecalcPrecipInSector(sec);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue