Skip to content

Commit

Permalink
refactor: remove redundant check for camera node
Browse files Browse the repository at this point in the history
  • Loading branch information
Balloonpopper authored and StraToN committed Mar 3, 2022
1 parent b8cefb8 commit 10f7708
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion addons/escoria-core/game/core-scripts/esc_item.gd
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 10f7708

Please sign in to comment.