diff --git a/src/emitter.cpp b/src/emitter.cpp index 184924d9..4777ef75 100644 --- a/src/emitter.cpp +++ b/src/emitter.cpp @@ -54,8 +54,10 @@ void Emitter::TickGame(float deltams) { for (int i = 0; i < data->nparticles; i++) { - data->velocities[i] = data->velocities[i] + deltams * data->gravity; - data->positions[i] = data->positions[i] + deltams * data->velocities[i]; + vec3 oldvelocity = data->velocities[i]; + data->velocities[i] += deltams * data->gravity; + data->positions[i] += deltams * 0.5f + * (oldvelocity + data->velocities[i]); if (data->positions[i].y < -100) { data->particles[i] = data->particles[data->nparticles - 1];