thanks wanp

This commit is contained in:
veclavtalica 2025-02-11 18:22:05 +03:00
parent 55c988dddc
commit a902cd56fc
2 changed files with 2 additions and 8 deletions

View File

@ -4,25 +4,20 @@ extends Node3D
@export var _projectile_holder: Node
@export var _production_timer: Timer
var _bomb_counter: int = 0
func _ready() -> void:
set_multiplayer_authority(1)
@rpc("authority", "call_local", "reliable")
func _drop_water() -> void:
var new_projectile: Node3D = _projectile_scene.instantiate()
new_projectile.name = "WaterBomb" + str(_bomb_counter)
_projectile_holder.add_child(new_projectile, true)
new_projectile.set_multiplayer_authority(1)
new_projectile.body.process_mode = Node.PROCESS_MODE_INHERIT
new_projectile.set_global_pos(global_position)
_bomb_counter += 1
func _on_drop_timer_timeout() -> void:
if not is_multiplayer_authority():
return
_drop_water.rpc()
_drop_water()

View File

@ -43,7 +43,6 @@ func _on_body_entered(p_body: Node3D) -> void:
is_dead = true
_model.hide()
if is_multiplayer_authority():
_disable_body.rpc()
await _splash_small_sound.finished