From c9e38c7b29a8a6cfbd0213f4bccda05cfe9b24cc Mon Sep 17 00:00:00 2001 From: yuni Date: Thu, 23 May 2024 00:40:47 +0200 Subject: [PATCH] avoid potential panic --- src/camera.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/camera.rs b/src/camera.rs index aae7401..93c1cd2 100644 --- a/src/camera.rs +++ b/src/camera.rs @@ -598,7 +598,7 @@ pub fn apply_input_to_player( if settings.rotation_stabilizer_active || key_input.pressed(settings.key_stop) { commands .entity(player_entity) - .insert(actor::WantsMaxRotation(mouse_speed as f64 * 0.1)); + .try_insert(actor::WantsMaxRotation(mouse_speed as f64 * 0.1)); } else { commands .entity(player_entity)