disable player movement/rotation controls in map

This commit is contained in:
yuni 2024-11-17 21:33:41 +01:00
parent 875bf5a972
commit 008e2d55bc

View file

@ -458,6 +458,9 @@ pub fn apply_input_to_player(
key_input: Res<ButtonInput<KeyCode>>, key_input: Res<ButtonInput<KeyCode>>,
q_windows: Query<&Window, With<PrimaryWindow>>, q_windows: Query<&Window, With<PrimaryWindow>>,
) { ) {
if settings.map_active || !settings.in_control() {
return;
}
let player = q_player.get_single_mut(); let player = q_player.get_single_mut();
if player.is_err() { if player.is_err() {
return; return;