mirror of
https://github.com/ppy/osu.git
synced 2024-09-21 18:47:27 +08:00
Fix kiai stars flickering on and off during gameplay
Closes #24503. The problematic reset of `lastParticleAdded` has been moved to a place that should hopefully (a) not cause such problems and (b) be much more explicit about what's happening.
This commit is contained in:
parent
31c31a9359
commit
ab1d523528
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user