1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-05 17:02:58 +08:00

Merge pull request #24547 from bdach/slider-kiai-stars-broke

Fix kiai stars flickering on and off during gameplay
This commit is contained in:
Dean Herbert 2023-08-15 15:21:46 +09:00 committed by GitHub
commit 57e49495bc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -49,6 +49,18 @@ namespace osu.Game.Graphics
this.maxDuration = maxDuration; this.maxDuration = maxDuration;
} }
protected override void LoadComplete()
{
base.LoadComplete();
Active.BindValueChanged(active =>
{
// ensure that particles can be spawned immediately after the spewer becomes active.
if (active.NewValue)
lastParticleAdded = null;
});
}
protected override void Update() protected override void Update()
{ {
base.Update(); base.Update();
@ -56,12 +68,8 @@ namespace osu.Game.Graphics
Invalidate(Invalidation.DrawNode); Invalidate(Invalidation.DrawNode);
if (!Active.Value || !CanSpawnParticles) if (!Active.Value || !CanSpawnParticles)
{
lastParticleAdded = null;
return; return;
}
// Always want to spawn the first particle in an activation immediately.
if (lastParticleAdded == null) if (lastParticleAdded == null)
{ {
lastParticleAdded = Time.Current; lastParticleAdded = Time.Current;