public void Start() { _acceptPlayers = false; _gameStarted = true; _broadcaster.Start(); GameStarted = true; }
public void Start() { _acceptPlayers = false; _gameStarted = true; _broadcaster.Start(); GameStarted = true; State.Instance.Handler.GameStarted = true; // Just a precaution, shouldn't happen though. if (_gameSettings.AllowSpectators == false) { foreach (var p in State.Instance.Players) { if (p.IsSpectator) { p.Kick("The game has started and doesn't allow spectators."); } } } }
public void Start() { _acceptPlayers = false; _gameStarted = true; _broadcaster.Start(); GameStarted = true; State.Instance.Handler.GameStarted = true; // Just a precaution, shouldn't happen though. if (_gameSettings.AllowSpectators == false) { foreach (var p in State.Instance.Players) { if (p.IsSpectator) { p.Kick(false, L.D.ServerMessage__SpectatorsNotAllowed); } } } if (State.Instance.Engine.IsLocal == false) { try { var c = new ApiClient(); var req = new PutGameHistoryReq(State.Instance.Engine.ApiKey, State.Instance.Engine.Game.Id.ToString()); foreach (var p in State.Instance.Players.ToArray()) { req.Usernames.Add(p.Nick); } c.CreateGameHistory(req); } catch (Exception e) { Log.Error("Start Error creating Game History", e); } } }