fix non-skipping particles

This commit is contained in:
MihailRis 2024-12-24 05:35:02 +03:00
parent faf4cfa735
commit f1c7317c5a

View File

@ -77,6 +77,10 @@ void Emitter::update(
count = std::max(0, count - skipped);
timer -= skipped * spawnInterval;
}
if (count < 0) {
int skipped = timer / spawnInterval;
timer -= skipped * spawnInterval;
}
return;
}
while (count && timer > spawnInterval) {