sevivon

[DORMANT] multiplayer dreidel game for mobile devices w/ godot
git clone git://git.figbert.com/sevivon.git
Log | Files | Refs | README | LICENSE

commit fd9ed4ef6137324859cab7d47924572d5825a060
parent 81f0a095470196781936eadf5b240915ad2470a0
Author: FIGBERT <figbert@figbert.com>
Date:   Fri,  5 Feb 2021 20:07:27 -0800

Merge duplicate rpc_id use into rpc calls

Diffstat:
Msrc/scripts/main.gd | 8++------
1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/src/scripts/main.gd b/src/scripts/main.gd @@ -55,18 +55,14 @@ func _client_joined_server(id: int) -> void: var peers := _join_array(players.keys(), "\n ") var message: String = "Some players are already here:\n %s" % peers rpc_id(id, "print_message_from_server", message) - for player in players: - var message := "%s has joined the server!" % id - rpc_id(player, "print_message_from_server", message) + rpc("print_message_from_server", "%s has joined the server!" % id) players[id] = { "gelt": PLAYER_STARTING_GELT, "in": true } func _client_left_server(id: int) -> void: print("%s disconnected from the server" % id) players.erase(id) - for player in players: - var message := "%s has left the server." % id - rpc_id(player, "print_message_from_server", message) + rpc("print_message_from_server", "%s has left the server." % id) ### Game Phases