Fixed netcode
This commit is contained in:
parent
48a72fd613
commit
1c062489b1
2 changed files with 4 additions and 11 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue