From 4c3e551295e12ef626ba2ec4be8205f4eecbd045 Mon Sep 17 00:00:00 2001 From: smoogipoo Date: Wed, 15 Aug 2018 11:47:54 +0900 Subject: [PATCH] Fix first object not receiving new combo Note: If a normal catch fruit is the first object, it does not receive a new combo... --- .../Rulesets/Objects/Legacy/Catch/ConvertHitObjectParser.cs | 3 ++- osu.Game/Rulesets/Objects/Legacy/ConvertHitObjectParser.cs | 4 ++++ .../Rulesets/Objects/Legacy/Osu/ConvertHitObjectParser.cs | 5 +++-- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/osu.Game/Rulesets/Objects/Legacy/Catch/ConvertHitObjectParser.cs b/osu.Game/Rulesets/Objects/Legacy/Catch/ConvertHitObjectParser.cs index ac97037d55..fb4cde479b 100644 --- a/osu.Game/Rulesets/Objects/Legacy/Catch/ConvertHitObjectParser.cs +++ b/osu.Game/Rulesets/Objects/Legacy/Catch/ConvertHitObjectParser.cs @@ -33,7 +33,7 @@ namespace osu.Game.Rulesets.Objects.Legacy.Catch return new ConvertSlider { X = position.X, - NewCombo = newCombo, + NewCombo = FirstObject || newCombo, ComboOffset = comboOffset, ControlPoints = controlPoints, Distance = length, @@ -48,6 +48,7 @@ namespace osu.Game.Rulesets.Objects.Legacy.Catch return new ConvertSpinner { EndTime = endTime, + NewCombo = FirstObject || newCombo, ComboOffset = comboOffset }; } diff --git a/osu.Game/Rulesets/Objects/Legacy/ConvertHitObjectParser.cs b/osu.Game/Rulesets/Objects/Legacy/ConvertHitObjectParser.cs index f9ca0545a1..8236333a3f 100644 --- a/osu.Game/Rulesets/Objects/Legacy/ConvertHitObjectParser.cs +++ b/osu.Game/Rulesets/Objects/Legacy/ConvertHitObjectParser.cs @@ -29,6 +29,8 @@ namespace osu.Game.Rulesets.Objects.Legacy /// protected readonly int FormatVersion; + protected bool FirstObject { get; private set; } = true; + protected ConvertHitObjectParser(double offset, int formatVersion) { Offset = offset; @@ -194,6 +196,8 @@ namespace osu.Game.Rulesets.Objects.Legacy result.StartTime = Convert.ToDouble(split[2], CultureInfo.InvariantCulture) + Offset; result.Samples = convertSoundType(soundType, bankInfo); + FirstObject = false; + return result; } catch (FormatException) diff --git a/osu.Game/Rulesets/Objects/Legacy/Osu/ConvertHitObjectParser.cs b/osu.Game/Rulesets/Objects/Legacy/Osu/ConvertHitObjectParser.cs index 9b0554c395..0823653830 100644 --- a/osu.Game/Rulesets/Objects/Legacy/Osu/ConvertHitObjectParser.cs +++ b/osu.Game/Rulesets/Objects/Legacy/Osu/ConvertHitObjectParser.cs @@ -24,7 +24,7 @@ namespace osu.Game.Rulesets.Objects.Legacy.Osu return new ConvertHit { Position = position, - NewCombo = newCombo, + NewCombo = FirstObject || newCombo, ComboOffset = comboOffset }; } @@ -34,7 +34,7 @@ namespace osu.Game.Rulesets.Objects.Legacy.Osu return new ConvertSlider { Position = position, - NewCombo = newCombo, + NewCombo = FirstObject || newCombo, ComboOffset = comboOffset, ControlPoints = controlPoints, Distance = Math.Max(0, length), @@ -50,6 +50,7 @@ namespace osu.Game.Rulesets.Objects.Legacy.Osu { Position = position, EndTime = endTime, + NewCombo = FormatVersion <= 8 || FirstObject || newCombo, ComboOffset = comboOffset }; }