Merge pull request #14822 from smoogipoo/fix-kiai-spawner-current-time

Fix cursor particles not spawned during kiai
This commit is contained in:
Dean Herbert 2021-09-21 15:53:38 +09:00 committed by GitHub
commit 5bcdd06b07
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 4 deletions

View File

@ -98,6 +98,7 @@ namespace osu.Game.Rulesets.Osu.Tests
{
var controlPointInfo = new ControlPointInfo();
controlPointInfo.Add(0, new EffectControlPoint { KiaiMode = true });
controlPointInfo.Add(5000, new EffectControlPoint { KiaiMode = false });
return new Beatmap
{

View File

@ -39,9 +39,6 @@ namespace osu.Game.Rulesets.Osu.Skinning.Legacy
[Resolved(canBeNull: true)]
private GameplayBeatmap gameplayBeatmap { get; set; }
[Resolved(canBeNull: true)]
private GameplayClock gameplayClock { get; set; }
[BackgroundDependencyLoader]
private void load(ISkinSource skin, OsuColour colours)
{
@ -83,7 +80,7 @@ namespace osu.Game.Rulesets.Osu.Skinning.Legacy
DrawableHitObject kiaiHitObject = null;
// Check whether currently in a kiai section first. This is only done as an optimisation to avoid enumerating AliveObjects when not necessary.
if (gameplayBeatmap.ControlPointInfo.EffectPointAt(gameplayBeatmap.Time.Current).KiaiMode)
if (gameplayBeatmap.ControlPointInfo.EffectPointAt(Time.Current).KiaiMode)
kiaiHitObject = playfield.HitObjectContainer.AliveObjects.FirstOrDefault(isTracking);
kiaiSpewer.Active.Value = kiaiHitObject != null;