Merge pull request #1210 from Yukitty/patch-hopFrames

fix(OverworldController): ledge jump arc to match player stepFrames
This commit is contained in:
bryanthaboi
2026-08-13 05:33:02 -04:00
committed by GitHub
+4 -2
View File
@@ -1397,14 +1397,16 @@ function OverworldState:checkLedgeHop(dir)
return false return false
end end
require("src.core.Sound").play(Game.data, "Ledge") 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) self:scriptMove(p, dir, 1, function() self:checkEdgeExit(dir) end)
return true return true
end end
if not Collision.occupied(self.entities, lx, ly, p) if not Collision.occupied(self.entities, lx, ly, p)
and self.map:isWalkableCell(lx, ly) then and self.map:isWalkableCell(lx, ly) then
require("src.core.Sound").play(Game.data, "Ledge") 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) self:scriptMove(p, dir, 2)
return true return true
end end