fix: empty out all gridmap layers under candy pump and use precise duration timer for projectile destruction (experimental branch)

This commit is contained in:
2026-06-29 21:54:52 +08:00
parent 5466f0bf36
commit 3ca2ff3c0f
2 changed files with 38 additions and 36 deletions
@@ -128,8 +128,10 @@ func spawn_projectile(target_world_pos: Vector3, duration: float) -> void:
# We need to wait for the X/Z tween to finish, but since it's parallel we can just use a separate timer or tween
# to kill the projectile exactly when duration is reached, ensuring it doesn't get killed early by X/Z finishing 1 frame earlier than Y
get_tree().create_timer(duration).timeout.connect(func():
if is_instance_valid(spin_tween): spin_tween.kill()
if is_instance_valid(projectile): projectile.queue_free()
if is_instance_valid(spin_tween):
spin_tween.kill()
if is_instance_valid(projectile):
projectile.queue_free()
)
func can_rpc() -> bool: