fix crash when arrows collide with multiple things at once (fixes #50)

This commit is contained in:
Haze Weathers 2023-02-17 12:37:53 -05:00
parent 0ec9a3ec79
commit c577f0a57c
2 changed files with 13 additions and 1 deletions

View file

@ -64,6 +64,10 @@ func _exit_tree():
get_tree().create_timer(particles.lifetime, false).connect("timeout", particles, "queue_free")
func _make_sparks():
# return if this has already happened to avoid crash
if is_queued_for_deletion():
return
var particles = $SparkParticles
remove_child(particles)
particles.global_position = global_position + particles.position * scale.x