/// <summary> /// Send message to all clients to prepare Scenario (Start Scenario has been pressed in lobby screen, clients will download world). /// </summary> internal static void PrepareScenarioFromLobby(long preparationStartTime) { Debug.Assert(Sync.IsServer); if (!Sync.IsServer) { return; } var msg = new PrepareScenarioFromLobbyMsg(); msg.ServerPlayerSteamId = Sync.MyId; msg.ServerPlayerIdentityId = MySession.Static.LocalPlayerId; msg.PreparationStartTime = preparationStartTime; Sync.Layer.SendMessageToAll(ref msg); }
private static void OnPrepareScenarioFromLobby(ref PrepareScenarioFromLobbyMsg msg, MyNetworkClient sender) { Debug.Assert(!Sync.IsServer); OnPrepareScenarioFromLobby(msg.PreparationStartTime); }
private static void OnPrepareScenarioFromLobby(ref PrepareScenarioFromLobbyMsg msg, MyNetworkClient sender) { Debug.Assert(!Sync.IsServer); OnPrepareScenarioFromLobby(msg.PreparationStartTime); }
/// <summary> /// Send message to all clients to prepare Scenario (Start Scenario has been pressed in lobby screen, clients will download world). /// </summary> internal static void PrepareScenarioFromLobby(long preparationStartTime) { Debug.Assert(Sync.IsServer); if (!Sync.IsServer) return; var msg = new PrepareScenarioFromLobbyMsg(); msg.ServerPlayerSteamId = Sync.MyId; msg.ServerPlayerIdentityId = MySession.Static.LocalPlayerId; msg.PreparationStartTime = preparationStartTime; Sync.Layer.SendMessageToAll(ref msg); }