diff --git a/korangar/src/input/mod.rs b/korangar/src/input/mod.rs index ed92e93e..3ac94f46 100644 --- a/korangar/src/input/mod.rs +++ b/korangar/src/input/mod.rs @@ -326,7 +326,7 @@ impl InputSystem { if self.right_mouse_button.pressed() && self.previous_mouse_button.button == MouseButton::Right - && client_tick.0.saturating_sub(self.previous_mouse_button.tick.0) < DOUBLE_CLICK_TIME_MS + && client_tick.0.wrapping_sub(self.previous_mouse_button.tick.0) < DOUBLE_CLICK_TIME_MS { events.push(UserEvent::CameraResetRotation); } diff --git a/korangar/src/world/entity/mod.rs b/korangar/src/world/entity/mod.rs index 961fb227..a4f8a961 100644 --- a/korangar/src/world/entity/mod.rs +++ b/korangar/src/world/entity/mod.rs @@ -108,7 +108,7 @@ impl SoundState { let should_play = if Some(sound_effect_key) == self.previous_key && let Some(last_tick) = self.last_played_at { - (client_tick.0.saturating_sub(last_tick.0)) >= SOUND_COOLDOWN_DURATION + (client_tick.0.wrapping_sub(last_tick.0)) >= SOUND_COOLDOWN_DURATION } else { true };