Fix critical bugs from code review
- room.gd: Add signal tracking and explicit cleanup in _exit_tree - room.gd: Guard _on_enemy_died against race condition after room freed - player.gd: Set _shield_ready = false on shield activation - player.gd: Fix coolant zone lambda syntax error - player.gd: Add apply_knockback() method for Hivemind pulse - player.gd: Fix coolant zone memory leak (use Timer child) - hud.gd: Remove deprecated boss bar code
This commit is contained in:
@@ -83,8 +83,8 @@ func _process(_delta: float) -> void:
|
||||
if _rooms_data.is_empty():
|
||||
return
|
||||
|
||||
# Find player if not cached
|
||||
if _player == null:
|
||||
# Find player if not cached or freed
|
||||
if _player == null or not is_instance_valid(_player):
|
||||
_player = get_tree().get_first_node_in_group("player")
|
||||
if _player == null:
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user