timedeltafix

This commit is contained in:
2026-05-07 21:46:46 +02:00
parent b353a96bfb
commit 6055b74ccf
13 changed files with 34 additions and 30 deletions

View File

@@ -103,8 +103,9 @@ function MinigameButtonMashWindow.update()
local mg = Context.minigame_button_mash
if mg.win_timer > 0 then
mg.win_timer = mg.win_timer - 1
if mg.win_timer == 0 then
mg.win_timer = mg.win_timer - Context.dt60
if mg.win_timer <= 0 then
mg.win_timer = 0
if mg.meter_on_complete then
mg.meter_on_complete(mg.elapsed_sec or 0)
else
@@ -142,13 +143,13 @@ function MinigameButtonMashWindow.update()
mg.win_timer = Config.timing.minigame_win_duration
return
end
local degradation = mg.base_degradation + (mg.bar_fill * mg.degradation_multiplier)
local degradation = (mg.base_degradation + (mg.bar_fill * mg.degradation_multiplier)) * Context.dt60
mg.bar_fill = mg.bar_fill - degradation
if mg.bar_fill < 0 then
mg.bar_fill = 0
end
if mg.button_pressed_timer > 0 then
mg.button_pressed_timer = mg.button_pressed_timer - 1
mg.button_pressed_timer = mg.button_pressed_timer - Context.dt60
end
if mg.focus_center_x then
Focus.set_percentage(mg.bar_fill / mg.target_points)