mirror of
https://github.com/ppy/osu.git
synced 2026-05-24 00:51:22 +08:00
Fix spawning edge case when elapsed became unexpectedly negative
This commit is contained in:
@@ -66,12 +66,13 @@ namespace osu.Game.Graphics
|
||||
{
|
||||
lastParticleAdded = Time.Current;
|
||||
spawnParticle();
|
||||
return;
|
||||
}
|
||||
|
||||
double timeElapsed = Math.Abs(Time.Current - lastParticleAdded.Value);
|
||||
double timeElapsed = Time.Current - lastParticleAdded.Value;
|
||||
|
||||
// Avoid spawning too many particles if a long amount of time has passed.
|
||||
if (timeElapsed > maxDuration)
|
||||
if (Math.Abs(timeElapsed) > maxDuration)
|
||||
{
|
||||
lastParticleAdded = Time.Current;
|
||||
spawnParticle();
|
||||
|
||||
Reference in New Issue
Block a user