From e3232dd754528a8e2136f6326e20d2671fb60b7d Mon Sep 17 00:00:00 2001 From: FreezyLemon Date: Wed, 29 Nov 2017 06:51:00 +0100 Subject: [PATCH] Added if to ignore more (for our purposes) useless keydowns --- .../UI/TaikoRulesetContainer.cs | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/osu.Game.Rulesets.Taiko/UI/TaikoRulesetContainer.cs b/osu.Game.Rulesets.Taiko/UI/TaikoRulesetContainer.cs index e3765c4252..f72d253a73 100644 --- a/osu.Game.Rulesets.Taiko/UI/TaikoRulesetContainer.cs +++ b/osu.Game.Rulesets.Taiko/UI/TaikoRulesetContainer.cs @@ -106,16 +106,20 @@ namespace osu.Game.Rulesets.Taiko.UI protected override bool OnKeyDown(InputState state, KeyDownEventArgs args) { - var sampleBank = Beatmap.ControlPointInfo.SoundPointAt(WorkingBeatmap.Track.CurrentTime).SampleBank ?? "normal"; - string sampleName = ""; + if (!args.Repeat) + { + var sampleBank = Beatmap.ControlPointInfo.SoundPointAt(WorkingBeatmap.Track.CurrentTime).SampleBank ?? "normal"; + string sampleName = ""; - if (centreKeys.Contains(args.Key)) - sampleName = "hitnormal"; + if (centreKeys.Contains(args.Key)) + sampleName = "hitnormal"; - else if (rimKeys.Contains(args.Key)) - sampleName = "hitclap"; + else if (rimKeys.Contains(args.Key)) + sampleName = "hitclap"; + + audio.Sample.Get($"Gameplay/{sampleBank}-{sampleName}")?.Play(); + } - audio.Sample.Get($"Gameplay/{sampleBank}-{sampleName}")?.Play(); return base.OnKeyDown(state, args); }