Skip to content

Commit

Permalink
Fix simple multiplayer demo for 3+ players
Browse files Browse the repository at this point in the history
Properly send newly connected dudes to old players
  • Loading branch information
Faless committed Oct 7, 2016
1 parent 95fff76 commit d22dd38
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions networking/simple_multiplayer/gamestate.gd
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ remote func register_player(id, name):
rpc_id(id, "register_player", 1, player_name) # Send myself to new dude
for p_id in players: # Then, for each remote player
rpc_id(id, "register_player", p_id, players[p_id]) # Send player to new dude
rpc_id(p_id, "register_player", id, name) # Send new dude to player

players[id] = name
emit_signal("player_list_changed")
Expand Down

0 comments on commit d22dd38

Please sign in to comment.