Skip to content

Commit

Permalink
Fix NPS being incorrect when chord cohesion is disabled.
Browse files Browse the repository at this point in the history
  • Loading branch information
xwidghet committed Mar 16, 2017
1 parent e6024e2 commit f5d6712
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
-- A moving average NPS calculator

local debug = false
local countNotesSeparately = GAMESTATE:CountNotesSeparately();
-- Generally, a smaller window will adapt faster, but a larger window will have a more stable value.
local maxWindow = themeConfig:get_data().NPSDisplay.MaxWindow/2 -- this will be the maximum size of the "window" in seconds.
local minWindow = themeConfig:get_data().NPSDisplay.MinWindow/2 -- this will be the minimum size of the "window" in seconds. Unused for now.
Expand Down Expand Up @@ -114,6 +115,10 @@ local peakNPS = {
-- This function is called whenever a JudgmentMessageCommand for regular tap note occurs.
-- (simply put, whenever you hit/miss a note)
local function addNote(pn,time,size)
if countNotesSeparately == true then
size = 1;
end

noteTable[pn][#noteTable[pn]+1] = {time,size}
noteSum[pn] = noteSum[pn]+size
end
Expand Down

0 comments on commit f5d6712

Please sign in to comment.