mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Only return early for floordiff if under-water surface is SLOPED
This commit is contained in:
parent
ad464817dd
commit
f06d4b4369
1 changed files with 4 additions and 3 deletions
|
|
@ -3218,14 +3218,15 @@ boolean P_CanRunOnWater(mobj_t *mobj, ffloor_t *rover)
|
|||
// We start water run IF we can step onto it!
|
||||
if (surfDiff <= maxStep && surfDiff >= 0)
|
||||
{
|
||||
if (ourZAng < 0)
|
||||
pslope_t *groundSlope = (flip ? mobj->subsector->sector->c_slope : mobj->subsector->sector->f_slope);
|
||||
if (groundSlope != NULL && groundSlope->zangle != 0)
|
||||
{
|
||||
fixed_t floorheight = flip ? P_GetSectorCeilingZAt(mobj->subsector->sector, mobj->x, mobj->y) : P_GetSectorFloorZAt(mobj->subsector->sector, mobj->x, mobj->y);
|
||||
fixed_t floorDiff = flip ? (floorheight - mobjbottom) : (mobjbottom - floorheight);
|
||||
if (floorDiff <= maxStep && floorDiff >= -maxStep)
|
||||
{
|
||||
// ... but NOT if going down and real floor is in range.
|
||||
// FIXME: Count solid FOFs in this check
|
||||
// ... but NOT if downward-sloping real floor is in range.
|
||||
// FIXME: Count solid FOFs in these checks
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue