fix non-skipping particles
This commit is contained in:
parent
faf4cfa735
commit
f1c7317c5a
@ -77,6 +77,10 @@ void Emitter::update(
|
|||||||
count = std::max(0, count - skipped);
|
count = std::max(0, count - skipped);
|
||||||
timer -= skipped * spawnInterval;
|
timer -= skipped * spawnInterval;
|
||||||
}
|
}
|
||||||
|
if (count < 0) {
|
||||||
|
int skipped = timer / spawnInterval;
|
||||||
|
timer -= skipped * spawnInterval;
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
while (count && timer > spawnInterval) {
|
while (count && timer > spawnInterval) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user