Biendeo / My-Clone-Hero-Tweaks

Tweaks to Clone Hero that I've made
GNU General Public License v3.0
15 stars 5 forks source link

[BUG] Average accuracy doesn't work #30

Closed Magnymbus closed 3 years ago

Magnymbus commented 3 years ago

Describe the bug The average accuracy indicator always shows the same time as the accuracy time indicator.

To Reproduce Steps to reproduce the behavior:

  1. Enable average accuracy indicator
  2. Play any song
  3. Observe that both indicators show the same number unless the note was missed, in which case the average will show the accuracy of the last hit note.

Expected behavior Average indicator should actually be an average of all hit notes. Here is an example of lua code that does this

Accumulative = 0
Total = 0
Average = 0
N = 0

function DoAverage(current) --this is the code you want, the rest is just to use it.
    Total = Total + 1
    Accumulative = Accumulative + current
    Average = Accumulative / Total
end

while N < 1000 do --This is just to make it do something
    N = N + 10
    DoAverage(N)
    io.write(Accumulative .. " / " .. Total .. " = " .. Average .. "\n")
end

Environment (please complete the following information):

Additional context I am NOT using CHLoader, if that matters.

Biendeo commented 3 years ago

I've definitely noticed a small error on the code side, see if v1.5.1.89-pre fixes it for you (just replace the AccuracyIndicator install with this one).

Magnymbus commented 3 years ago

That was fast! Will do.

Magnymbus commented 3 years ago

Seems to work just fine now, thank you!

Issue closed by v1.5.1.89-pre