コード例 #1
0
ファイル: DemoParser.cs プロジェクト: steinn/demoinfo
		internal void RaisePlayerDisconnect(PlayerDisconnectEventArgs bind)
		{
			if (PlayerDisconnect != null)
				PlayerDisconnect(this, bind);
		}
コード例 #2
0
		/// <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;
		}