Move /particle count 0 particles at speed times delta

This commit is contained in:
Kacpherek
2026-10-26 20:31:14 +01:00
parent e704a8dccb
commit 41ca489d4e
@@ -605,8 +605,11 @@ impl Game<'_> {
let reached = reached.len() as i32;
if !local {
} else if count <= 0 {
// No count: one particle with the delta as velocity.
self.particles.create(&options, pos, delta);
// handleParticleEvent, count 0: one particle, the speed times
// the delta as velocity (both sent as floats).
let speed = f64::from(speed);
self.particles
.create(&options, pos, delta.map(|d| speed * f64::from(d as f32)));
} else {
for _ in 0..count {
let r = self.particles.random();