Exemplo n.º 1
0
 private async void HandleServerStartMultiplayer()
 {
     GameNetwork.PreStartMultiplayerOnServer();
     BannerlordNetwork.StartMultiplayerLobbyMission(LobbyMissionType.Custom);
     if (Module.CurrentModule.StartMultiplayerGame(this._gameClient.CustomGameType, this._gameClient.CustomGameScene))
     {
         ;
     }
     while (Mission.Current == null || Mission.Current.CurrentState != Mission.State.Continuing)
     {
         await Task.Delay(1);
     }
     GameNetwork.StartMultiplayerOnServer(9999);
     if (!this._gameClient.IsInGame)
     {
         return;
     }
     BannerlordNetwork.CreateServerPeer();
     MBDebug.Print("Server: I finished loading and I am now visible to clients in the server list.", debugFilter: 17179869184UL);
     if (GameNetwork.IsDedicatedServer)
     {
         return;
     }
     GameNetwork.ClientFinishedLoading(GameNetwork.MyPeer);
 }
Exemplo n.º 2
0
 protected override void StartMultiplayer()
 {
     MBDebug.Print("CUSTOM GAME SERVER ADDRESS: " + this._address);
     GameNetwork.StartMultiplayerOnClient(this._address, this._port, this._sessionKey, this._peerIndex);
     BannerlordNetwork.StartMultiplayerLobbyMission(LobbyMissionType.Custom);
 }
 protected override void StartMultiplayer()
 {
     GameNetwork.StartMultiplayerOnClient(this._address, this._assignedPort, this._sessionKey, this._playerIndex);
     BannerlordNetwork.StartMultiplayerLobbyMission(LobbyMissionType.Matchmaker);
     Module.CurrentModule.StartMultiplayerGame(this._multiplayerGameType, this._scene);
 }