1
0
mirror of https://github.com/ppy/osu.git synced 2026-05-31 07:09:54 +08:00

Added if to ignore more (for our purposes) useless keydowns

This commit is contained in:
FreezyLemon
2017-11-29 06:51:00 +01:00
Unverified
parent c00fb47236
commit e3232dd754
@@ -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);
}