1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-21 14:07:25 +08:00

Fix kiai hit steps not working correctly

This commit is contained in:
Bartłomiej Dach 2020-12-12 22:48:22 +01:00
parent 8292c746ea
commit 34e7a36b38
2 changed files with 7 additions and 14 deletions

View File

@ -13,12 +13,15 @@ namespace osu.Game.Rulesets.Taiko.Tests
{ {
public readonly HitResult Type; public readonly HitResult Type;
public DrawableTestHit(Hit hit, HitResult type = HitResult.Great) public DrawableTestHit(Hit hit, HitResult type = HitResult.Great, bool kiai = false)
: base(hit) : base(hit)
{ {
Type = type; Type = type;
HitObject.ApplyDefaults(new ControlPointInfo(), new BeatmapDifficulty()); var controlPoints = new ControlPointInfo();
controlPoints.Add(0, new EffectControlPoint { KiaiMode = kiai });
HitObject.ApplyDefaults(controlPoints, new BeatmapDifficulty());
} }
protected override void UpdateInitialTransforms() protected override void UpdateInitialTransforms()

View File

@ -106,13 +106,8 @@ namespace osu.Game.Rulesets.Taiko.Tests
{ {
HitResult hitResult = RNG.Next(2) == 0 ? HitResult.Ok : HitResult.Great; HitResult hitResult = RNG.Next(2) == 0 ? HitResult.Ok : HitResult.Great;
var cpi = new ControlPointInfo();
cpi.Add(0, new EffectControlPoint { KiaiMode = kiai });
Hit hit = new Hit(); Hit hit = new Hit();
hit.ApplyDefaults(cpi, new BeatmapDifficulty()); var h = new DrawableTestHit(hit, kiai: kiai) { X = RNG.NextSingle(hitResult == HitResult.Ok ? -0.1f : -0.05f, hitResult == HitResult.Ok ? 0.1f : 0.05f) };
var h = new DrawableTestHit(hit) { X = RNG.NextSingle(hitResult == HitResult.Ok ? -0.1f : -0.05f, hitResult == HitResult.Ok ? 0.1f : 0.05f) };
DrawableRuleset.Playfield.Add(h); DrawableRuleset.Playfield.Add(h);
@ -123,13 +118,8 @@ namespace osu.Game.Rulesets.Taiko.Tests
{ {
HitResult hitResult = RNG.Next(2) == 0 ? HitResult.Ok : HitResult.Great; HitResult hitResult = RNG.Next(2) == 0 ? HitResult.Ok : HitResult.Great;
var cpi = new ControlPointInfo();
cpi.Add(0, new EffectControlPoint { KiaiMode = kiai });
Hit hit = new Hit { IsStrong = true }; Hit hit = new Hit { IsStrong = true };
hit.ApplyDefaults(cpi, new BeatmapDifficulty()); var h = new DrawableTestHit(hit, kiai: kiai) { X = RNG.NextSingle(hitResult == HitResult.Ok ? -0.1f : -0.05f, hitResult == HitResult.Ok ? 0.1f : 0.05f) };
var h = new DrawableTestHit(hit) { X = RNG.NextSingle(hitResult == HitResult.Ok ? -0.1f : -0.05f, hitResult == HitResult.Ok ? 0.1f : 0.05f) };
DrawableRuleset.Playfield.Add(h); DrawableRuleset.Playfield.Add(h);