mirror of
https://github.com/godotengine/godot-demo-projects.git
synced 2026-01-08 00:40:08 +01:00
Change to correct RPC syntax in Multiplayer bomber demo (#802)
This commit is contained in:
@@ -11,7 +11,7 @@ func explode():
|
||||
for p in in_area:
|
||||
if p.has_method("exploded"):
|
||||
# Exploded can only be called by the authority, but will also be called locally.
|
||||
p.rpc(&"exploded", from_player)
|
||||
p.exploded.rpc(from_player)
|
||||
|
||||
|
||||
func done():
|
||||
|
||||
@@ -27,7 +27,7 @@ signal game_error(what)
|
||||
# Callback from SceneTree.
|
||||
func _player_connected(id):
|
||||
# Registration of a client beings here, tell the connected player that we are here.
|
||||
rpc_id(id, StringName("register_player"), player_name)
|
||||
register_player.rpc_id(id, player_name)
|
||||
|
||||
|
||||
# Callback from SceneTree.
|
||||
|
||||
Reference in New Issue
Block a user