mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-12-27 04:41:23 +00:00
Merge branch 'reverseplatform_clipping' into 'next'
FF_REVERSEPLATFORM clipping Ran into an issue whilst testing out one last feature (there's always one more...) for flat_alignment_revamp. This is a backported fix. The bug was such that if you're falling through a platform with FF_REVERSEPLATFORM and not FF_PLATFORM, you'll be pushed downwards such that your head is against the bottom of the FOF. This just checks momz is greater than zero if it has FF_REVERSEPLATFORM to make sure it's okay to set ceilingz. (OR the alternative in reverse gravity.) No test map because this was originally done for internal. Instead, test it on the other branch's test map. See merge request !83
This commit is contained in:
commit
191a4bc7d2
1 changed files with 4 additions and 2 deletions
|
@ -2013,12 +2013,14 @@ static void P_AdjustMobjFloorZ_FFloors(mobj_t *mo, sector_t *sector, UINT8 motyp
|
|||
delta1 = mo->z - (bottomheight + ((topheight - bottomheight)/2));
|
||||
delta2 = thingtop - (bottomheight + ((topheight - bottomheight)/2));
|
||||
if (topheight > mo->floorz && abs(delta1) < abs(delta2)
|
||||
&& !(rover->flags & FF_REVERSEPLATFORM))
|
||||
&& !(rover->flags & FF_REVERSEPLATFORM)
|
||||
&& ((P_MobjFlip(mo)*mo->momz > 0) || (!(rover->flags & FF_PLATFORM)))) // In reverse gravity, only clip for FOFs that are intangible from their bottom (the "top" you're falling through) if you're coming from above ("below" in your frame of reference)
|
||||
{
|
||||
mo->floorz = topheight;
|
||||
}
|
||||
if (bottomheight < mo->ceilingz && abs(delta1) >= abs(delta2)
|
||||
&& !(rover->flags & FF_PLATFORM))
|
||||
&& !(rover->flags & FF_PLATFORM)
|
||||
&& ((P_MobjFlip(mo)*mo->momz > 0) || (!(rover->flags & FF_REVERSEPLATFORM)))) // In normal gravity, only clip for FOFs that are intangible from the top if you're coming from below
|
||||
{
|
||||
mo->ceilingz = bottomheight;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue