Fix mobjs sometimes clipping through floors (whoops!)

This commit is contained in:
RedEnchilada 2015-05-25 12:16:19 -05:00
parent d9d3752b4e
commit 5e18db79e9

View file

@ -2272,6 +2272,11 @@ static boolean P_ZMovement(mobj_t *mo)
mom.y = mo->momy; mom.y = mo->momy;
mom.z = mo->momz; mom.z = mo->momz;
if (mo->eflags & MFE_VERTICALFLIP)
mo->z = mo->ceilingz - mo->height;
else
mo->z = mo->floorz;
#ifdef ESLOPE #ifdef ESLOPE
P_TryMove(mo, mo->x, mo->y, true); // Sets mo->standingslope correctly P_TryMove(mo, mo->x, mo->y, true); // Sets mo->standingslope correctly
if (mo->standingslope) { if (mo->standingslope) {
@ -2282,11 +2287,6 @@ static boolean P_ZMovement(mobj_t *mo)
} }
#endif #endif
if (mo->eflags & MFE_VERTICALFLIP)
mo->z = mo->ceilingz - mo->height;
else
mo->z = mo->floorz;
// hit the floor // hit the floor
if (mo->type == MT_FIREBALL) // special case for the fireball if (mo->type == MT_FIREBALL) // special case for the fireball
mom.z = P_MobjFlip(mo)*FixedMul(5*FRACUNIT, mo->scale); mom.z = P_MobjFlip(mo)*FixedMul(5*FRACUNIT, mo->scale);