1
0
mirror of https://github.com/ppy/osu.git synced 2026-05-24 04:09:53 +08:00

Fix spawning edge case when elapsed became unexpectedly negative

This commit is contained in:
Dean Herbert
2023-07-19 14:10:27 +09:00
Unverified
parent 7fa95f7512
commit 5e2a0bd733
+3 -2
View File
@@ -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();