From 34d1890f1c85089168b6e69f16532b0edfb09447 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Thu, 9 Feb 2023 17:57:51 +0900 Subject: [PATCH] Change snapping to only apply to classic mod --- osu.Game.Rulesets.Taiko/Mods/TaikoModClassic.cs | 10 +++++++++- .../Objects/Drawables/DrawableHit.cs | 3 ++- .../Rulesets/Objects/Drawables/DrawableHitObject.cs | 9 +++++++++ 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/osu.Game.Rulesets.Taiko/Mods/TaikoModClassic.cs b/osu.Game.Rulesets.Taiko/Mods/TaikoModClassic.cs index 2ccdfd40e5..300c72a854 100644 --- a/osu.Game.Rulesets.Taiko/Mods/TaikoModClassic.cs +++ b/osu.Game.Rulesets.Taiko/Mods/TaikoModClassic.cs @@ -2,13 +2,15 @@ // See the LICENCE file in the repository root for full licence text. using osu.Game.Rulesets.Mods; +using osu.Game.Rulesets.Objects.Drawables; using osu.Game.Rulesets.Taiko.Objects; +using osu.Game.Rulesets.Taiko.Objects.Drawables; using osu.Game.Rulesets.Taiko.UI; using osu.Game.Rulesets.UI; namespace osu.Game.Rulesets.Taiko.Mods { - public class TaikoModClassic : ModClassic, IApplicableToDrawableRuleset + public class TaikoModClassic : ModClassic, IApplicableToDrawableRuleset, IApplicableToDrawableHitObject { public void ApplyToDrawableRuleset(DrawableRuleset drawableRuleset) { @@ -18,5 +20,11 @@ namespace osu.Game.Rulesets.Taiko.Mods var playfield = (TaikoPlayfield)drawableRuleset.Playfield; playfield.ClassicHitTargetPosition.Value = true; } + + public void ApplyToDrawableHitObject(DrawableHitObject drawable) + { + if (drawable is DrawableHit) + drawable.SnapJudgementLocation = true; + } } } diff --git a/osu.Game.Rulesets.Taiko/Objects/Drawables/DrawableHit.cs b/osu.Game.Rulesets.Taiko/Objects/Drawables/DrawableHit.cs index ef87522eea..62c8457c58 100644 --- a/osu.Game.Rulesets.Taiko/Objects/Drawables/DrawableHit.cs +++ b/osu.Game.Rulesets.Taiko/Objects/Drawables/DrawableHit.cs @@ -207,7 +207,8 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables const float gravity_time = 300; const float gravity_travel_height = 200; - MainPiece.MoveToX(-X); // Visually snap hit object to hit target + if (SnapJudgementLocation) + MainPiece.MoveToX(-X); this.ScaleTo(0.8f, gravity_time * 2, Easing.OutQuad); diff --git a/osu.Game/Rulesets/Objects/Drawables/DrawableHitObject.cs b/osu.Game/Rulesets/Objects/Drawables/DrawableHitObject.cs index 39f0888882..01550a113f 100644 --- a/osu.Game/Rulesets/Objects/Drawables/DrawableHitObject.cs +++ b/osu.Game/Rulesets/Objects/Drawables/DrawableHitObject.cs @@ -662,6 +662,15 @@ namespace osu.Game.Rulesets.Objects.Drawables /// public virtual double MaximumJudgementOffset => HitObject.HitWindows?.WindowFor(HitResult.Miss) ?? 0; + /// + /// Whether the location of the hit should be snapped to the hit target before animating. + /// + /// + /// This is how osu-stable worked, but notably is not how TnT works. + /// It results in less visual feedback on hit accuracy. + /// + public bool SnapJudgementLocation { get; set; } + /// /// Applies the of this , notifying responders such as /// the of the .