From c44ebe2757fe9f7939a3d06b8235e7100fa8b192 Mon Sep 17 00:00:00 2001 From: GoaLitiuM Date: Tue, 4 Oct 2016 20:23:17 +0300 Subject: [PATCH] bmson: Workaround for misinterpret total values --- Pulsus/Gameplay/BMSON/BMSONChart.cs | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/Pulsus/Gameplay/BMSON/BMSONChart.cs b/Pulsus/Gameplay/BMSON/BMSONChart.cs index 3e3a533..a05a45c 100644 --- a/Pulsus/Gameplay/BMSON/BMSONChart.cs +++ b/Pulsus/Gameplay/BMSON/BMSONChart.cs @@ -1,7 +1,7 @@ -using Pulsus.Audio; +using System; using System.Collections.Generic; using System.IO; -using System; +using Pulsus.Audio; namespace Pulsus.Gameplay { @@ -14,7 +14,7 @@ public class BMSONChart : Chart public override int rank { get { return rankLegacy; } } public override double rankMultiplier { get { return rankMultiplierReal; } } public override double gaugeTotal { get { return 0.0; } } - public override double gaugeMultiplier { get { return bmson.info.total / 100.0; } } + public override double gaugeMultiplier { get { return total / 100.0; } } public override double volume { get { return 1.0; } } public override int playLevel { get { return (int)bmson.info.level; } } public override string previewFile { get { return bmson.info.preview_music; } } @@ -33,6 +33,7 @@ public class BMSONChart : Chart private BMSONHeader bmson; private int rankLegacy = 2; + private double total = 100; private double rankMultiplierReal = 1.0; public BMSONChart(string basePath, BMSONHeader bmson) @@ -60,6 +61,13 @@ public override void GenerateEvents() else rankMultiplierReal = bmson.info.judge_rank / 100.0; + total = bmson.info.total; + + // total value should be in percentages, but the value was entered + // as a multiplier, convert the value back to percentages. + if (total <= 13) // arbitrary value + total = bmson.info.total * 100.0; + // collect all time related events into one collection if (version.Major == 0) // bmson 0.21 {