From 036ae622001e64039c8bb663d244f44d442c2059 Mon Sep 17 00:00:00 2001 From: Maxime Cauvin Date: Sun, 16 Feb 2020 02:46:26 +0100 Subject: [PATCH] fix/master: Fixed an issue where bombs were not excluded correctly from the NPS calculation --- ChartPlugin/Core/ChartCreator.cs | 17 +++++++++-------- ChartPlugin/Properties/AssemblyInfo.cs | 4 ++-- ChartPlugin/manifest.json | 2 +- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/ChartPlugin/Core/ChartCreator.cs b/ChartPlugin/Core/ChartCreator.cs index c593c9f..a0173e1 100644 --- a/ChartPlugin/Core/ChartCreator.cs +++ b/ChartPlugin/Core/ChartCreator.cs @@ -27,17 +27,17 @@ public NpsInfo(float nps, float fromTime, float toTime) } } - private LevelData _mainGameSceneSetupData; - private BeatmapData _beatmapData; + private LevelData _mainGameSceneSetupData; + private BeatmapData _beatmapData; private AudioTimeSyncController _audioTimeSyncController; - private List _npsSections; - private WindowGraph _windowGraph; + private List _npsSections; + private WindowGraph _windowGraph; private AssetBundle _assetBundle; - private bool _isInitialized; - private bool _isFinished; + private bool _isInitialized; + private bool _isFinished; private NpsInfo _currentSection; - private int _currentSectionIdx; + private int _currentSectionIdx; private GameObject _selfCursor; private int _hardestSectionIdx; private Canvas _canvas; @@ -176,8 +176,9 @@ private List GetNpsSections() var notes = new List(); notes = _beatmapData.beatmapLinesData.Aggregate(notes, (current, beatmapLineData) => current.Concat(beatmapLineData.beatmapObjectsData) - .Where(data => data.beatmapObjectType == BeatmapObjectType.Note).ToList()); + .Where(data => data.beatmapObjectType == BeatmapObjectType.Note && ((NoteData)data).noteType != NoteType.Bomb).ToList()); notes.Sort((s1, s2) => s1.time.CompareTo(s2.time)); + if (notes.Count > 0) { var tempNoteCount = 0; diff --git a/ChartPlugin/Properties/AssemblyInfo.cs b/ChartPlugin/Properties/AssemblyInfo.cs index 9f6571a..318f7b9 100644 --- a/ChartPlugin/Properties/AssemblyInfo.cs +++ b/ChartPlugin/Properties/AssemblyInfo.cs @@ -31,5 +31,5 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.3")] -[assembly: AssemblyFileVersion("1.0.3")] +[assembly: AssemblyVersion("1.0.4")] +[assembly: AssemblyFileVersion("1.0.4")] diff --git a/ChartPlugin/manifest.json b/ChartPlugin/manifest.json index 0c15b08..dd65eba 100644 --- a/ChartPlugin/manifest.json +++ b/ChartPlugin/manifest.json @@ -5,7 +5,7 @@ "gameVersion": "1.7.0", "id": "SongChartVisualizer", "name": "SongChartVisualizer", - "version": "1.0.3", + "version": "1.0.4", "dependsOn": { "BS Utils": "^1.4.1", "BeatSaberMarkupLanguage": "^1.1.4"