summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbd <bdunahu@operationnull.com>2025-05-29 15:27:20 -0400
committerbd <bdunahu@operationnull.com>2025-05-29 15:27:20 -0400
commit4a24041fdadcef8548da302922095ca2d359941a (patch)
treeb2a809b955f49d55b80ba27ec97dffccbc62c2a2
parentfc2227b1681036c31e4ddd827a5f58506e472831 (diff)
Fix bug where towers entering would continuously reset fire timer
-rw-r--r--scripts/base_defender.gd3
1 files changed, 2 insertions, 1 deletions
diff --git a/scripts/base_defender.gd b/scripts/base_defender.gd
index 0f1003b..782fd2a 100644
--- a/scripts/base_defender.gd
+++ b/scripts/base_defender.gd
@@ -60,7 +60,8 @@ func _update_state_machine(curr : PathFollow2D) -> void:
func _on_tower_body_entered(body: Node2D) -> void:
if target == null && "Crawler" in body.name:
- $FireTimer.start(tower_data["fire_rate"])
+ select_target()
+ $FireTimer.start()
func _attack_state():
sprite_node.texture = _attack_texture