mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
P_ZMovement: take object's momentum after P_CheckPosition
This commit is contained in:
parent
ddb55c95c7
commit
d7d365f1e4
1 changed files with 5 additions and 3 deletions
|
|
@ -2379,9 +2379,6 @@ boolean P_ZMovement(mobj_t *mo)
|
||||||
&& !(mo->flags & MF_NOCLIPHEIGHT))
|
&& !(mo->flags & MF_NOCLIPHEIGHT))
|
||||||
{
|
{
|
||||||
vector3_t mom;
|
vector3_t mom;
|
||||||
mom.x = mo->momx;
|
|
||||||
mom.y = mo->momy;
|
|
||||||
mom.z = mo->momz;
|
|
||||||
|
|
||||||
if (mo->eflags & MFE_VERTICALFLIP)
|
if (mo->eflags & MFE_VERTICALFLIP)
|
||||||
mo->z = mo->ceilingz - mo->height;
|
mo->z = mo->ceilingz - mo->height;
|
||||||
|
|
@ -2398,6 +2395,11 @@ boolean P_ZMovement(mobj_t *mo)
|
||||||
if (P_MobjWasRemoved(mo)) // mobjs can be removed by P_CheckPosition -- Monster Iestyn 31/07/21
|
if (P_MobjWasRemoved(mo)) // mobjs can be removed by P_CheckPosition -- Monster Iestyn 31/07/21
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
// Set these here since P_CheckPosition can alter object's momentum values
|
||||||
|
mom.x = mo->momx;
|
||||||
|
mom.y = mo->momy;
|
||||||
|
mom.z = mo->momz;
|
||||||
|
|
||||||
K_UpdateMobjTerrain(mo, ((mo->eflags & MFE_VERTICALFLIP) ? tm.ceilingpic : tm.floorpic));
|
K_UpdateMobjTerrain(mo, ((mo->eflags & MFE_VERTICALFLIP) ? tm.ceilingpic : tm.floorpic));
|
||||||
|
|
||||||
if (((mo->eflags & MFE_VERTICALFLIP) ? tm.ceilingslope : tm.floorslope) && (mo->type != MT_STEAM))
|
if (((mo->eflags & MFE_VERTICALFLIP) ? tm.ceilingslope : tm.floorslope) && (mo->type != MT_STEAM))
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue