From a5e1dde0294535dda0952357b3ce4ec6b7e1a9f8 Mon Sep 17 00:00:00 2001 From: dingo Date: Fri, 8 May 2026 15:54:53 -0400 Subject: [PATCH] Aura bubbles remain after mob removed from board, until a new tile is clicked --- Client/origin-client/scenes/game/game_screen.gd | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/Client/origin-client/scenes/game/game_screen.gd b/Client/origin-client/scenes/game/game_screen.gd index 4860630..715bbfe 100644 --- a/Client/origin-client/scenes/game/game_screen.gd +++ b/Client/origin-client/scenes/game/game_screen.gd @@ -384,6 +384,7 @@ func _on_state_updated(state: Dictionary) -> void: print("[GameScreen] state_updated phase=", state.get("phase", "?"), " mode=", _sel_ctrl.mode if _sel_ctrl != null else "n/a") _unit_reg.rebuild_ownership(state) + _clear_stale_aura_overlay() var p1_id: String = str(state.get("playerOneAccountId", "")) if not p1_id.is_empty(): @@ -931,6 +932,21 @@ func _clear_aura_hover_overlay() -> void: _hovered_aura_unit_id = "" +func _clear_stale_aura_overlay() -> void: + if _hovered_aura_unit_id.is_empty(): + return + var unit: Dictionary = Game.get_unit_by_id(_hovered_aura_unit_id) + if unit.is_empty(): + _clear_aura_hover_overlay() + return + var pos: Variant = unit.get("position") + if not (pos is Dictionary) or (pos as Dictionary).is_empty(): + _clear_aura_hover_overlay() + return + if _aura_ranges_for_unit(unit).is_empty(): + _clear_aura_hover_overlay() + + func _aura_ranges_for_unit(unit: Dictionary) -> Array[Dictionary]: var raw_abil: Variant = unit.get("abilitiesJson") var parsed: Variant = JSON.parse_string("[]" if raw_abil == null else str(raw_abil))