feat: support configurable game server address and port
* Launch game servers in headless mode * Add configurable game address and port to GameData * Pass dynamically assigned server ports to clients * Update lobby defaults for `0.0.0.0:8080` * Refactor server command-line argument handling
This commit is contained in:
@@ -45,11 +45,15 @@ func _launch_game_server(
|
||||
var port: String = InstanceLauncher.launch_game_server(match_entry.data.type)
|
||||
if port == "-1":
|
||||
# TODO: Alert clients that the game wont be created due to
|
||||
# server reaching number of allowed instances
|
||||
# server reaching number of allowed instances.
|
||||
return
|
||||
|
||||
Globals.game_data.rpc_id(client1.id, "set_game_address", "127.0.0.1")
|
||||
Globals.game_data.rpc_id(client2.id, "set_game_address", "127.0.0.1")
|
||||
# TODO: Set address dynamically; I.E. if game on different server than lobby.
|
||||
# As is, clients use the lobby address since games launch on new ports.
|
||||
# Will have to change how we watch game server death if on diff server.
|
||||
#Globals.game_data.rpc_id(client1.id, "set_game_address", "51.222.85.126")
|
||||
#Globals.game_data.rpc_id(client2.id, "set_game_address", "51.222.85.126")
|
||||
|
||||
Globals.game_data.rpc_id(client1.id, "set_game_port", port)
|
||||
Globals.game_data.rpc_id(client2.id, "set_game_port", port)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user