From 865abb23660fc7f4e323643efe208bcd17b21f09 Mon Sep 17 00:00:00 2001 From: Mashy Date: Fri, 8 Nov 2019 10:58:32 +1000 Subject: [PATCH] actually push cd fix --- server/src/game.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/server/src/game.rs b/server/src/game.rs index 1eaa786b..bccc6588 100644 --- a/server/src/game.rs +++ b/server/src/game.rs @@ -469,6 +469,11 @@ impl Game { let mut resolutions = resolution_steps(&cast, &mut self); r_animation_ms = resolutions.iter().fold(r_animation_ms, |acc, r| acc + r.clone().get_delay()); + + if resolutions.len() > 0 { + casts.push(cast); + } + self.resolved.append(&mut resolutions); // while let Some(resolution) = resolutions.pop() { @@ -479,7 +484,6 @@ impl Game { // the cast itself goes into this temp vec // to handle cooldowns - casts.push(cast); // sort the stack again in case speeds have changed self.stack_sort_speed();