summaryrefslogtreecommitdiffstats
path: root/player.gd
diff options
context:
space:
mode:
authorJan Tuomi <jan@jantuomi.fi>2025-11-30 17:20:59 +0200
committerJan Tuomi <jan@jantuomi.fi>2025-11-30 17:20:59 +0200
commit9ff143c5af68853b7f417d54f06aa194039114d2 (patch)
tree1bb7653f443a8c56ab03e44b3cd29b46f2d8bfdf /player.gd
parentdf09cd144f7fc81fba89981e6e28423a4cd31fe7 (diff)
Clean up asserts
Diffstat (limited to 'player.gd')
-rw-r--r--player.gd6
1 files changed, 1 insertions, 5 deletions
diff --git a/player.gd b/player.gd
index 3e6850c..ec4136f 100644
--- a/player.gd
+++ b/player.gd
@@ -50,12 +50,8 @@ func get_facing() -> int:
func handle_action_input():
var hooks = get_tree().get_nodes_in_group("hook_hanging")
for hook_any in hooks:
- if not hook_any is HookHanging:
- print_debug("hook is not HookHanging!", hook_any)
- continue
-
+ assert(hook_any is HookHanging, "hook is not a Hook")
var hook: HookHanging = hook_any
var dist = (hook.global_position - global_position).length()
- #print_debug("found hook: ", hook, ", dist: ", dist)
if dist < hook_distance_max:
request_state_hanging(hook, hook.hang_distance)