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 # 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 # 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(): get_tree().create_timer(duration).timeout.connect(func():
if is_instance_valid(spin_tween): spin_tween.kill() if is_instance_valid(spin_tween):
if is_instance_valid(projectile): projectile.queue_free() spin_tween.kill()
if is_instance_valid(projectile):
projectile.queue_free()
) )
func can_rpc() -> bool: func can_rpc() -> bool:
+1 -1
View File
@@ -391,7 +391,7 @@ func sync_arena_setup() -> void:
print("[Gauntlet] Client: Syncing Arena Setup (%dx%d)..." % [ARENA_COLUMNS, ARENA_ROWS]) print("[Gauntlet] Client: Syncing Arena Setup (%dx%d)..." % [ARENA_COLUMNS, ARENA_ROWS])
_apply_arena_setup() _apply_arena_setup()
func _apply_arena_setup() -> void: func _apply_arena_setup() -> void:
"""Shared arena layout logic for host + clients.""" """Shared arena layout logic for host + clients."""
if not gridmap: if not gridmap:
gridmap = get_parent().get_node_or_null("EnhancedGridMap") gridmap = get_parent().get_node_or_null("EnhancedGridMap")