Skip to content

Fix wall transfer cap for slopes with angles beyond the first quadrant

Lach requested to merge Lach/SRB2:fix-1335 into next

Resolves #1335. It appears wall transfers are intended to give a 15° buff to the slope angle, with a cap at 90°/270°. The root issue is that slope->zangle > 0 is never false because angles are unsigned (perhaps the function author was in the Lua brainspace), so a slope that faces away from a wall and inclines downwards accidentally gets a 15° nerf instead of a 15° buff. The condition for applying the cap is also incorrect; it ignores that slope angles approaching 90°/270° can do so from any of the four quadrants.

Could break some maps built around the weaker wall launches?

Merge request reports

Loading