Browse Source

Network placement nodes properly in live-join

master
Luna 7 years ago
parent
commit
8412ab0cbb
1 changed files with 3 additions and 2 deletions
  1. +3
    -2
      scripts/placement.gd

+ 3
- 2
scripts/placement.gd View File

@ -22,13 +22,14 @@ func _init(parent, scene_path):
# Set the network master to the player's network master, which happens to be its name
# This allows it to use master, slave keywords appropriately
var net_id = int(player.get_name())
set_name("Placement") # We need to share common name for networking
set_network_master(net_id)
scene = load(scene_path)
rpc("request_placed", net_id)
rpc("request_placed", get_tree().get_network_unique_id())
master func request_placed(from):
for node in placed:
rpc_id(from, "slave_place", node)
rpc_id(from, "slave_place", node.transform)
func place_input(radius=-1):


Loading…
Cancel
Save