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
1 changed files with 5 additions and 5 deletions

View File

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