thanks wanp
This commit is contained in:
parent
55c988dddc
commit
a902cd56fc
@ -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()
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user