Skip to content

Commit

Permalink
fix Lua errors when adjusting sync in gameplay
Browse files Browse the repository at this point in the history
  • Loading branch information
quietly-turning committed Jun 1, 2019
1 parent 1a20548 commit 264cd95
Showing 1 changed file with 6 additions and 0 deletions.
Expand Up @@ -75,6 +75,12 @@ if mods.SubtractiveScoring then
-- used to determine if a player has failed yet
local topscreen = SCREENMAN:GetTopScreen()

-- if the player adjusts the sync of the stepchart during gameplay, they will eventually
-- reach ScreenPrompt, where they'll be prompted to accept or reject the sync changes.
-- Although the screen changes, this Lua sticks around, and the TopScreen will no longer
-- have a GetLifeMeter() method.
if topscreen.GetLifeMeter == nil then return end

-- if this is an undesirable judgment AND we can still count up AND it's not a dropped hold
if tns == undesirable_judgment
and not received_judgment_lower_than_desired
Expand Down

0 comments on commit 264cd95

Please sign in to comment.