From 20d19e3c714d3e8ca3e35c170c07c563ecc719bb Mon Sep 17 00:00:00 2001 From: JAROWMR Date: Sat, 14 Dec 2024 21:30:32 +0100 Subject: fixed bug with lower than one particle per second --- src/crepe/system/ParticleSystem.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/crepe/system') diff --git a/src/crepe/system/ParticleSystem.cpp b/src/crepe/system/ParticleSystem.cpp index e61f0ce..35a1d41 100644 --- a/src/crepe/system/ParticleSystem.cpp +++ b/src/crepe/system/ParticleSystem.cpp @@ -27,7 +27,7 @@ void ParticleSystem::update() { = mgr.get_components_by_id(emitter.game_object_id).front().get(); // Emit particles based on emission_rate - emitter.spawn_accumulator = emitter.data.emission_rate * dt; + emitter.spawn_accumulator += emitter.data.emission_rate * dt; while (emitter.spawn_accumulator >= 1.0) { this->emit_particle(emitter, transform); emitter.spawn_accumulator -= 1.0; -- cgit v1.2.3