Move /particle count 0 particles at speed times delta
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user