Fix speed explosion when running into a wall on a slippery surface.

This commit is contained in:
Max 2023-06-23 22:25:51 -05:00 committed by GitHub
parent be512b42b4
commit 8dd9f38891
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -682,7 +682,7 @@ local function commonSlideAction(m: Mario, endAction: number, airAction: number,
slideBonk(m, Action.GROUND_BONK, endAction)
elseif wall then
local wallAngle = Util.Atan2s(wall.Normal.Z, wall.Normal.X)
local slideSpeed = math.sqrt(m.SlideVelX ^ 2 * m.SlideVelZ ^ 2) * 0.9
local slideSpeed = math.sqrt(m.SlideVelX ^ 2 + m.SlideVelZ ^ 2) * 0.9
if slideSpeed < 4 then
slideSpeed = 4