mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2025-02-25 05:10:53 +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.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);
|
||||||
|
|
Loading…
Reference in a new issue