mirror of
https://github.com/bryanthaboi/gen1recomp.git
synced 2026-08-17 19:24:01 +02:00
Fix faint slide starting partway down (#671)
The faint slide was shortened from 30 to Timing.FAINT_SLIDE (14) frames in the timing-parity pass, but fxFaintOffset still computed the offset with a stale (30 - frames) * 2. With frames starting at 14 the sprite teleported 32px down on the first frame and only slid the remaining 28px, cutting the animation short. SlideDownFaintedMonPic drops the pic one 8px row per 2-frame step, so the offset advances Timing.FAINT_SLIDE_STEP (4px) per frame at 1x and covers the full 56px PIC_HEIGHT over the 14-frame budget.
This commit is contained in:
@@ -4542,11 +4542,15 @@ end
|
||||
-- pixels, so it scales with the pic's draw scale (the player's default 2x
|
||||
-- sinks 2x as fast to sink at the same visual rate); a mod scale composes
|
||||
-- the same way. scale defaults to the vanilla side scale when unknown.
|
||||
-- SlideDownFaintedMonPic drops the pic one 8px row per 2-frame step, so
|
||||
-- the offset advances Timing.FAINT_SLIDE_STEP (4px) per frame at 1x --
|
||||
-- the full 56px PIC_HEIGHT slide over the 14-frame budget (#671: the
|
||||
-- old (30 - frames) math teleported the sprite 32px down on frame one).
|
||||
function BattleState:fxFaintOffset(battler, scale)
|
||||
local fx = self.fx
|
||||
if self:fxFaintActive(battler) then
|
||||
scale = scale or (battler.isPlayer and 2 or 1)
|
||||
return (30 - fx.faint.frames) * 2 * scale
|
||||
return (Timing.FAINT_SLIDE - fx.faint.frames) * Timing.FAINT_SLIDE_STEP * scale
|
||||
end
|
||||
return 0
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user