mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-24 21:31:46 +00:00
Fix equation slopes breaking with slopes farther than 32k FU away from the map center
This commit is contained in:
parent
940756ad62
commit
c3a8f452e2
1 changed files with 3 additions and 3 deletions
|
@ -810,10 +810,10 @@ void P_InitSlopes(void)
|
|||
// Returns the height of the sloped plane at (x, y) as a fixed_t
|
||||
fixed_t P_GetSlopeZAt(const pslope_t *slope, fixed_t x, fixed_t y)
|
||||
{
|
||||
fixed_t dist = FixedMul(x - slope->o.x, slope->d.x) +
|
||||
FixedMul(y - slope->o.y, slope->d.y);
|
||||
fixed_t dist = FixedMul(x - slope->o.x, slope->d.x) / 2 +
|
||||
FixedMul(y - slope->o.y, slope->d.y) / 2;
|
||||
|
||||
return slope->o.z + FixedMul(dist, slope->zdelta);
|
||||
return slope->o.z + FixedMul(dist, slope->zdelta) * 2;
|
||||
}
|
||||
|
||||
// Like P_GetSlopeZAt but falls back to z if slope is NULL
|
||||
|
|
Loading…
Reference in a new issue