fix(OverworldController): ledge jump arc to match player stepFrames

This commit is contained in:
Yukita Mayako
2026-08-12 21:23:35 -04:00
parent c3136bf8f7
commit f138827917
+4 -2
View File
@@ -1397,14 +1397,16 @@ function OverworldState:checkLedgeHop(dir)
return false
end
require("src.core.Sound").play(Game.data, "Ledge")
p.hopFrames, p.hopTotal = 32, 32 -- jump arc (cosmetic)
local hop = (p.stepFramesCur or p.stepFrames or 16) * 2
p.hopFrames, p.hopTotal = hop, hop -- jump arc (cosmetic)
self:scriptMove(p, dir, 1, function() self:checkEdgeExit(dir) end)
return true
end
if not Collision.occupied(self.entities, lx, ly, p)
and self.map:isWalkableCell(lx, ly) then
require("src.core.Sound").play(Game.data, "Ledge")
p.hopFrames, p.hopTotal = 32, 32 -- jump arc (cosmetic)
local hop = (p.stepFramesCur or p.stepFrames or 16) * 2
p.hopFrames, p.hopTotal = hop, hop -- jump arc (cosmetic)
self:scriptMove(p, dir, 2)
return true
end