mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-29 12:40:58 +00:00
Fix mobjs sometimes clipping through floors (whoops!)
This commit is contained in:
parent
d9d3752b4e
commit
5e18db79e9
1 changed files with 5 additions and 5 deletions
10
src/p_mobj.c
10
src/p_mobj.c
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue