diff options
Diffstat (limited to 'Game/Client.gd')
-rw-r--r-- | Game/Client.gd | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Game/Client.gd b/Game/Client.gd index db33a26..60efbb8 100644 --- a/Game/Client.gd +++ b/Game/Client.gd @@ -24,6 +24,9 @@ func initialize_stage(stage: Stage): func place_tower(tower: Tower): + if not current_stage.can_place_tower(): + return + var network_id = multiplayer.get_unique_id() tower.owner_id = network_id tower.name = "Tower@" + str(network_id) + "@" + str(Time.get_ticks_usec()) @@ -59,6 +62,9 @@ func update_tower(path: NodePath, data: Tower.NetworkData): func spawn_unit(unit: Unit, spawn: Spawn, overwrite_target: PathNode = null): + if not current_stage.can_spawn_unit(): + return + var network_id = multiplayer.get_unique_id() unit.owner_id = network_id unit.name = "Unit@" + str(network_id) + "@" + str(Time.get_ticks_usec()) |