[splittiming] Versus scoring fix...wait.

This is in the wrong branch. Transplant time!
This commit is contained in:
Jason Felds
2011-05-14 12:44:59 -04:00
parent a70f087b0c
commit 682d679349
+8 -5
View File
@@ -89,11 +89,14 @@ r['DDR Extreme'] = function(params, pss)
local totalItems = GetTotalItems(radarValues); local totalItems = GetTotalItems(radarValues);
local singleStep = (1 + totalItems) * totalItems / 2; local singleStep = (1 + totalItems) * totalItems / 2;
if (not Shared.CurrentStep) then if (not Shared.CurrentStep) then
Shared.CurrentStep = 0 Shared.CurrentStep = {};
Shared.CurrentStep["P1"] = 0;
Shared.CurrentStep["P2"] = 0;
end; end;
Shared.CurrentStep = Shared.CurrentStep + 1; local pn = PlayerNumberToString(params.Player);
Shared.CurrentStep[pn] = Shared.CurrentStep[pn] + 1;
local stepValue = math.floor(baseScore /singleStep); local stepValue = math.floor(baseScore /singleStep);
local stepLast = stepValue * Shared.CurrentStep; local stepLast = stepValue * Shared.CurrentStep[pn];
pss:SetCurMaxScore(pss:GetCurMaxScore() + pss:SetCurMaxScore(pss:GetCurMaxScore() +
(stepLast * judgmentBase['TapNoteScore_W1'])); (stepLast * judgmentBase['TapNoteScore_W1']));
local judgeScore = 0; local judgeScore = 0;
@@ -107,9 +110,9 @@ r['DDR Extreme'] = function(params, pss)
end; end;
local stepScore = judgeScore * stepLast; local stepScore = judgeScore * stepLast;
pss:SetScore(pss:GetScore() + stepScore); pss:SetScore(pss:GetScore() + stepScore);
if (Shared.CurrentStep >= totalItems) then -- Just in case. if (Shared.CurrentStep[pn] >= totalItems) then -- Just in case.
-- TODO: Implement the bonus for the last step? -- TODO: Implement the bonus for the last step?
Shared.CurrentStep = 0; -- Reset for the next song. Shared.CurrentStep[pn] = 0; -- Reset for the next song.
end; end;
end; end;
----------------------------------------------------------- -----------------------------------------------------------