mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-03-24 19:52:08 +00:00
Make the function ACTUALLY work
This commit is contained in:
parent
82ceddb2be
commit
8a00b47b38
1 changed files with 3 additions and 3 deletions
|
@ -5024,9 +5024,9 @@ fixed_t P_CeilingzAtPos(fixed_t x, fixed_t y, fixed_t z, fixed_t height)
|
|||
|
||||
if (rover->flags & FF_QUICKSAND)
|
||||
{
|
||||
if (z < topheight && bottomheight < thingtop)
|
||||
if (thingtop > bottomheight && topheight > z)
|
||||
{
|
||||
if (ceilingz < z)
|
||||
if (ceilingz > z)
|
||||
ceilingz = z;
|
||||
}
|
||||
continue;
|
||||
|
@ -5034,7 +5034,7 @@ fixed_t P_CeilingzAtPos(fixed_t x, fixed_t y, fixed_t z, fixed_t height)
|
|||
|
||||
delta1 = z - (bottomheight + ((topheight - bottomheight)/2));
|
||||
delta2 = thingtop - (bottomheight + ((topheight - bottomheight)/2));
|
||||
if (bottomheight > ceilingz && abs(delta1) < abs(delta2))
|
||||
if (bottomheight < ceilingz && abs(delta1) > abs(delta2))
|
||||
ceilingz = bottomheight;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue