internal void RaisePlayerDisconnect(PlayerDisconnectEventArgs bind) { if (PlayerDisconnect != null) PlayerDisconnect(this, bind); }
/// <summary> /// Handler for when a player disconnect from the server /// Used to avoid wrong clutch count as the player may be considered as alive and in a specific team whereas he is not /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void HandlePlayerDisconnect(object sender, PlayerDisconnectEventArgs e) { if (e.Player == null) return; PlayerExtended playerDisconnected = Demo.Players.FirstOrDefault(p => p.SteamId == e.Player.SteamID); if (playerDisconnected == null) return; playerDisconnected.IsAlive = false; playerDisconnected.Team = Team.Spectate; }