mirror of
https://github.com/RHeavenStudio/HeavenStudio.git
synced 2025-06-12 21:47:39 +02:00
try to fix weird score bug
controller only gets re-assigned on first boot don't stall the cpu to queue frames
This commit is contained in:
@ -134,6 +134,21 @@ namespace HeavenStudio
|
||||
barSlider.fillRect.GetComponent<Image>().color = barColourNg;
|
||||
|
||||
string propSuffix = "ng";
|
||||
double inputs = 0, score = 0;
|
||||
foreach (var input in judgementInfo.inputs)
|
||||
{
|
||||
inputs += input.weight;
|
||||
score += Math.Clamp(input.accuracyState, 0, 1) * input.weight;
|
||||
}
|
||||
if (inputs > 0)
|
||||
{
|
||||
score /= inputs;
|
||||
}
|
||||
else
|
||||
{
|
||||
score = 0;
|
||||
}
|
||||
judgementInfo.finalScore = score;
|
||||
if (judgementInfo.finalScore < Minigame.rankOkThreshold)
|
||||
{
|
||||
rank = Rank.Ng;
|
||||
|
Reference in New Issue
Block a user