From bde066af06fd5a8ead103537956d969bc8a4ae32 Mon Sep 17 00:00:00 2001 From: Sofia Date: Sat, 25 Jul 2026 22:53:47 +0300 Subject: [PATCH] Don't update map if it really didn't change --- rust/src/game_manager.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/rust/src/game_manager.rs b/rust/src/game_manager.rs index e063320..2a88069 100644 --- a/rust/src/game_manager.rs +++ b/rust/src/game_manager.rs @@ -431,6 +431,9 @@ impl Game { } pub fn change_map_selection(&mut self, map_idx: u8, emit: bool) { + if self.selected_map_idx == map_idx { + return; + } self.selected_map_idx = map_idx; if let Some(map) = self.maps.get(map_idx as usize) { self.selected_map = Some(map);