fix: Godot 4.2.1 compat and map builder fixes

- Fix tab character in _build_elevated_walkways() call (line 63)
- Fix untyped 'pos' variable in grapple pillar loop (line 376)
- Remove fog_sky_affinity (Godot 4.3+ only property)
- Replace preload() with load() for runtime script loading
- Replace 'is DoubleBarrelShotgun' type check with duck-typing
- Fix 'is not OfflineMultiplayerPeer' syntax in grenade spawn
- Replace absf() with abs() in state_machine, state_air, state_ground
- Update test_level.tscn to remove stale UID reference

All fixes verified: PARSE OK and scene runs without script errors
on Godot 4.2.1 headless.
This commit is contained in:
2026-06-21 01:24:42 -04:00
parent f164afecd8
commit 462d12bee5
6 changed files with 15 additions and 16 deletions
+3 -3
View File
@@ -226,7 +226,7 @@ func detect_wall_horizontal() -> Vector3:
continue
var n: Vector3 = hit.get("normal", Vector3.ZERO)
# Wall must be roughly vertical (normal mostly horizontal)
if absf(n.y) < 0.3 and n.length_squared() > 0.0:
if abs(n.y) < 0.3 and n.length_squared() > 0.0:
wall_normal = n.normalized()
wall_side = side_data["side"]
return wall_normal
@@ -246,7 +246,7 @@ func detect_wall_horizontal() -> Vector3:
if collider is PlayerMovementController or collider is CharacterBody3D or collider.has_method("take_damage"):
continue
var n: Vector3 = hit.get("normal", Vector3.ZERO)
if absf(n.y) < 0.3 and n.length_squared() > 0.0:
if abs(n.y) < 0.3 and n.length_squared() > 0.0:
wall_normal = n.normalized()
wall_side = side_data["side"]
return wall_normal
@@ -294,7 +294,7 @@ func detect_wall_forward() -> Dictionary:
return {"hit": false, "normal": Vector3.ZERO, "is_short": false}
var normal: Vector3 = best_hit.get("normal", Vector3.ZERO)
if absf(normal.y) >= 0.3:
if abs(normal.y) >= 0.3:
return {"hit": false, "normal": Vector3.ZERO, "is_short": false} # Not a vertical wall
# Check if wall is short (ledge check) using a top ray