From 394e2a71fbbca948ec0dfa71832a6b6944ffedae Mon Sep 17 00:00:00 2001 From: VinPropane Date: Sun, 5 Apr 2026 00:44:07 -0400 Subject: [PATCH] NS-23: Fix const LEDGE_DROP_STEPS (Godot const expression rule) --- client/scripts/player.gd | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/client/scripts/player.gd b/client/scripts/player.gd index 32a507e..6663b06 100644 --- a/client/scripts/player.gd +++ b/client/scripts/player.gd @@ -14,7 +14,7 @@ const STEP_MAX_HEIGHT: float = 0.32 const STEP_PROBE_FWD: float = 0.38 const STUCK_HORIZ_SPEED: float = 0.28 ## Drop tries when leaving a bump (combined with forward over the lip). -const LEDGE_DROP_STEPS: PackedFloat32Array = PackedFloat32Array([0.08, 0.12, 0.18, 0.24, 0.32]) +const LEDGE_DROP_STEPS = [0.08, 0.12, 0.18, 0.24, 0.32] var _has_walk_goal: bool = false var _auth_walk_goal: Vector3 = Vector3.ZERO @@ -90,8 +90,7 @@ func _autostep_up(xf: Transform3D, motion_fwd: Vector3, dir_h: Vector3) -> bool: func _autostep_down(xf: Transform3D, motion_fwd: Vector3, dir_h: Vector3) -> bool: - for i: int in range(LEDGE_DROP_STEPS.size()): - var drop: float = LEDGE_DROP_STEPS[i] + for drop: float in LEDGE_DROP_STEPS: var motion_off: Vector3 = motion_fwd + Vector3(0.0, -drop, 0.0) if test_move(xf, motion_off): continue