From cb987df446e33809547b795d8a59dcbbed97efa3 Mon Sep 17 00:00:00 2001 From: Relintai Date: Sun, 26 Apr 2020 00:57:32 +0200 Subject: [PATCH] Fix turn panel. --- game/ui/touch_pad/TurnPanel.gd | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/game/ui/touch_pad/TurnPanel.gd b/game/ui/touch_pad/TurnPanel.gd index 021047d8..fa85b654 100644 --- a/game/ui/touch_pad/TurnPanel.gd +++ b/game/ui/touch_pad/TurnPanel.gd @@ -13,11 +13,15 @@ var last_pointer_position : Vector2 = Vector2() var currentPointerIDX = INACTIVE_IDX; -var listener : Entity = null +var listener : Node = null func _ready(): parent = get_node("..") - listener = get_node(listenerNodePath) as Entity + listener = get_node(listenerNodePath) + + if listener != null: + if not listener.has_method("queue_camera_rotation"): + listener = null set_process_input(true)