mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-27 04:21:47 +00:00
Obj_SneakerPanelSetup: call P_CheckPosition directly and manually set standingslope
- P_TryMove may fail for STEP UP (ooooh, scary) reasons
This commit is contained in:
parent
8dc35c0fe3
commit
244cb1759d
1 changed files with 15 additions and 1 deletions
|
|
@ -44,7 +44,21 @@ void Obj_SneakerPanelSetup(mobj_t *mobj, mapthing_t *mthing)
|
||||||
mobj->eflags |= MFE_VERTICALFLIP;
|
mobj->eflags |= MFE_VERTICALFLIP;
|
||||||
mobj->flags2 |= MF2_OBJECTFLIP;
|
mobj->flags2 |= MF2_OBJECTFLIP;
|
||||||
}
|
}
|
||||||
P_TryMove(mobj, mobj->x, mobj->y, true, NULL); // sets standingslope
|
|
||||||
|
if (P_CheckPosition(mobj, mobj->x, mobj->y, NULL))
|
||||||
|
{
|
||||||
|
if (P_IsObjectFlipped(mobj))
|
||||||
|
{
|
||||||
|
if (tm.ceilingz <= mobj->z + mobj->height)
|
||||||
|
mobj->standingslope = tm.ceilingslope;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (mobj->z <= tm.floorz)
|
||||||
|
mobj->standingslope = tm.floorslope;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Obj_SneakerPanelSpriteScale(mobj);
|
Obj_SneakerPanelSpriteScale(mobj);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue