Skip to content

Commit

Permalink
til death invoke 2 rescores when switching scores while rescoring
Browse files Browse the repository at this point in the history
this is so that things dont visibly break and percentages suddenly make no sense
  • Loading branch information
poco0317 committed Dec 19, 2022
1 parent ab32cd9 commit 298c406
Showing 1 changed file with 13 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,18 @@ local function scoreBoard(pn, position)
ChangeScoreCommand = function(self, params)
if params.score then
score = params.score
setupNewScoreData(score)
if usingCustomWindows then
-- this is done very carefully to rescore a newly selected score once for wife3 and once for custom rescoring
unloadCustomWindowConfig()
usingCustomWindows = false
setupNewScoreData(score)
MESSAGEMAN:Broadcast("ScoreChanged")
usingCustomWindows = true
loadCurrentCustomWindowConfig()
setupNewScoreData(score)
else
setupNewScoreData(score)
end
end

if usingCustomWindows then
Expand Down Expand Up @@ -282,10 +293,10 @@ local function scoreBoard(pn, position)
if not usingCustomWindows then
unloadCustomWindowConfig()
MESSAGEMAN:Broadcast("UnloadedCustomWindow")
MESSAGEMAN:Broadcast("RecalculateGraphs", {judge=judge})
self:GetParent():playcommand("ChangeScore", {score = score})
MESSAGEMAN:Broadcast("SetFromDisplay", {score = score})
MESSAGEMAN:Broadcast("ForceWindow", {judge=judge})
MESSAGEMAN:Broadcast("RecalculateGraphs", {judge=judge})
else
loadCurrentCustomWindowConfig()
MESSAGEMAN:Broadcast("RecalculateGraphs", {judge=judge})
Expand Down

0 comments on commit 298c406

Please sign in to comment.