mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-12-28 05:11:34 +00:00
Merge branch 'reverseplatform_clippingfixed' into 'next'
Fixing FF_REVERSEPLATFORM clipping fixes Forgot the case where == 0. Tested by @wolfy852 in Top Down, where the bugs this caused were first discovered. See merge request !121
This commit is contained in:
commit
f72e8a8ff8
1 changed files with 2 additions and 2 deletions
|
@ -2017,13 +2017,13 @@ static void P_AdjustMobjFloorZ_FFloors(mobj_t *mo, sector_t *sector, UINT8 motyp
|
||||||
delta2 = thingtop - (bottomheight + ((topheight - bottomheight)/2));
|
delta2 = thingtop - (bottomheight + ((topheight - bottomheight)/2));
|
||||||
if (topheight > mo->floorz && abs(delta1) < abs(delta2)
|
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)
|
&& ((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;
|
mo->floorz = topheight;
|
||||||
}
|
}
|
||||||
if (bottomheight < mo->ceilingz && abs(delta1) >= abs(delta2)
|
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
|
&& ((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;
|
mo->ceilingz = bottomheight;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue