Fixed netcode

This commit is contained in:
Rendo 2025-11-26 16:51:39 +05:00
commit 1c062489b1
2 changed files with 4 additions and 11 deletions

View file

@ -12,11 +12,12 @@ func _input(event: InputEvent) -> void:
if not machine.is_multiplayer_authority(): return
if event.is_action_pressed("plr_reload"):
init_reload()
init_reload.rpc()
func use_begin() -> void:
transition.emit("Shoot")
@rpc("authority","call_local","reliable")
func init_reload():
if machine.ammo == machine.max_ammo:
return