public static void PlayerWon(MyPlayer.PlayerId id, int triggerIndex) { MySessionComponentMissionTriggers.Static.SetWon(id, triggerIndex); if (!Sync.MultiplayerActive || !MySession.Static.IsScenario) return; WonMsg msg = new WonMsg(); msg.index = triggerIndex; msg.playerId = id; Sync.Layer.SendMessageToAll(ref msg, MyTransportMessageEnum.Success); }
public static void PlayerWon(MyPlayer.PlayerId id, int triggerIndex) { MySessionComponentMissionTriggers.Static.SetWon(id, triggerIndex); if (!Sync.MultiplayerActive || !MySession.Static.IsScenario) { return; } WonMsg msg = new WonMsg(); msg.index = triggerIndex; msg.playerId = id; Sync.Layer.SendMessageToAll(ref msg, MyTransportMessageEnum.Success); }
static void PlayerWonSuccess(ref WonMsg msg, MyNetworkClient sender) { MySessionComponentMissionTriggers.Static.SetWon(msg.playerId, msg.index); }