avoid potential panic

This commit is contained in:
yuni 2024-05-23 00:40:47 +02:00
parent 62a0387867
commit c9e38c7b29

View file

@ -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)