refactor: remove redundant check for camera node

This commit is contained in:
Balloonpopper
2022-02-20 22:59:07 +11:00
committed by Julian Murgia
parent b8cefb8003
commit 10f770855f

View File

@@ -497,7 +497,8 @@ func update_idle():
# Return the camera position if a camera_position_node exists or the
# global position of the player
func get_camera_node():
if camera_node and get_node(camera_node):
if has_node(camera_node):
escoria.logger.debug("Camera node found - directing camera to the camera_node on " + global_id)
return get_node(camera_node)
return self