Sweep collision fix

This commit is contained in:
2026-03-09 21:21:31 -04:00
parent 9697c68cf1
commit 7d33eddd08
+9 -3
View File
@@ -582,10 +582,16 @@ func _tick_sweep_projs(delta: float) -> void:
var still_valid: Array[Dictionary] = [] var still_valid: Array[Dictionary] = []
for p in _sweep_projs: for p in _sweep_projs:
if not p.has("node"): if not p.has("node") or not p.has("vel"):
continue continue
var node: Node2D = p["node"]
if not is_instance_valid(node): # Check validity on raw value before casting
var raw_node = p["node"]
if raw_node == null or not is_instance_valid(raw_node):
continue
var node := raw_node as Node2D
if node == null:
continue continue
var vel: Vector2 = p["vel"] var vel: Vector2 = p["vel"]