mirror of
https://github.com/bryanthaboi/gen1recomp.git
synced 2026-08-19 20:20:19 +02:00
Merge pull request #1210 from Yukitty/patch-hopFrames
fix(OverworldController): ledge jump arc to match player stepFrames
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user