From 7e4b8e2e4a08d4b4b24d797dea0263ae3aca2d67 Mon Sep 17 00:00:00 2001 From: Jason Felds Date: Sun, 10 Apr 2011 01:51:39 -0400 Subject: [PATCH] [sm130futures] Simpler method of cleaning the counter. --- Themes/_fallback/Scripts/04 SpecialScoring.lua | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/Themes/_fallback/Scripts/04 SpecialScoring.lua b/Themes/_fallback/Scripts/04 SpecialScoring.lua index 68775dbca8..65748dac25 100644 --- a/Themes/_fallback/Scripts/04 SpecialScoring.lua +++ b/Themes/_fallback/Scripts/04 SpecialScoring.lua @@ -64,15 +64,11 @@ r['DDR Extreme'] = function(params, pss) local baseScore = (steps:IsAnEdit() and 5 or steps:GetMeter()) * 1000000; local totalItems = GetTotalItems(radarValues); - if (not Shared.TotalItems) then - Shared.TotalItems = -1; - end; local singleStep = (1 + totalItems) * totalItems / 2; - if (Shared.TotalItems ~= totalItems) then + if (not Shared.CurrentStep) then Shared.CurrentStep = 0 end; Shared.CurrentStep = Shared.CurrentStep + 1; - Shared.TotalItems = totalItems; local stepLast = math.floor(baseScore / singleStep) * (Shared.CurrentStep); local judgeScore = 0; if (params.HoldNoteScore == 'HoldNoteScore_Held') then @@ -84,7 +80,9 @@ r['DDR Extreme'] = function(params, pss) end; end; local stepScore = judgeScore * stepLast; - + if (Shared.CurrentStep >= totalItems) then -- Just in case. + Shared.CurrentStep = 0; -- Reset for the next song. + end; pss:SetScore(pss:GetScore() + stepScore); end; -----------------------------------------------------------