Skip to content
Snippets Groups Projects
Commit 1a6e48de authored by sphere's avatar sphere
Browse files

Update mobj floorz/ceilingz after FOF destruction

parent b5c3b30f
No related branches found
No related tags found
2 merge requests!2355fix newer versions of mixerx,!1945Update mobj floorz/ceilingz after a bustable FOF is destroyed
...@@ -1212,6 +1212,19 @@ static boolean T_SectorHasEnemies(sector_t *sec) ...@@ -1212,6 +1212,19 @@ static boolean T_SectorHasEnemies(sector_t *sec)
return false; 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 // T_NoEnemiesThinker
// //
...@@ -1938,6 +1951,7 @@ void EV_CrumbleChain(sector_t *sec, ffloor_t *rover) ...@@ -1938,6 +1951,7 @@ void EV_CrumbleChain(sector_t *sec, ffloor_t *rover)
// no longer exists (can't collide with again) // no longer exists (can't collide with again)
rover->fofflags &= ~FOF_EXISTS; rover->fofflags &= ~FOF_EXISTS;
rover->master->frontsector->moved = true; rover->master->frontsector->moved = true;
T_UpdateMobjPlaneZ(sec); // prevent objects from floating
P_RecalcPrecipInSector(sec); P_RecalcPrecipInSector(sec);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment