Пример #1
0
 internal void RaiseRoundStart(RoundStartedEventArgs rs)
 {
     if (RoundStart != null)
     {
         RoundStart(this, rs);
     }
 }
Пример #2
0
		protected override void HandleRoundStart(object sender, RoundStartedEventArgs e)
		{
			// Match is really ongoing after a LO3
			if (!IsOvertime && _matchStartedCount > 1) IsMatchStarted = true;
			if (!IsMatchStarted) return;

			IsFreezetime = true;

			CreateNewRound();
		}
Пример #3
0
		internal void RaiseRoundStart(RoundStartedEventArgs rs)
		{
			if (RoundStart != null)
				RoundStart(this, rs);
		}
Пример #4
0
		protected abstract void HandleRoundStart(object sender, RoundStartedEventArgs e);
Пример #5
0
		protected override void HandleRoundStart(object sender, RoundStartedEventArgs e)
		{
			if (!IsMatchStarted) return;

			IsFreezetime = true;

			// Reset until both scores > 0
			if (Parser.CTScore == 0 && Parser.TScore == 0)
			{
				Demo.ResetStats(false);
				RoundCount = 0;
				AddTeams();
			}

			CreateNewRound();

			if (RoundCount == 16)
			{
				IsHalfMatch = true;
				SwapTeams();
			}

			if(!IsOvertime) return;

			// Detect the half of an overtime
			if (_playerTeamCount > 8 && IsLastRoundHalf) IsHalfMatch = !IsHalfMatch;
			if (IsLastRoundHalf) IsLastRoundHalf = false;
			_playerTeamCount = 0;
		}
Пример #6
0
		protected override void HandleRoundStart(object sender, RoundStartedEventArgs e)
		{
			if (!IsMatchStarted) return;
			// Check players count to prevent missing players who was connected after the match started event
			if (Demo.Players.Count < 10)
			{
				// Add all players to our ObservableCollection of PlayerExtended
				foreach (Player player in Parser.PlayingParticipants)
				{
					// don't add bot and already known players
					if (player.SteamID != 0 && Demo.Players.FirstOrDefault(p => p.SteamId == player.SteamID) == null)
					{
						PlayerExtended pl = new PlayerExtended
						{
							SteamId = player.SteamID,
							Name = player.Name,
							Team = player.Team
						};
						Application.Current.Dispatcher.Invoke(delegate
						{
							Demo.Players.Add(pl);
							if (pl.Team == Team.CounterTerrorist)
							{
								Demo.PlayersTeam1.Add(pl);
							}
							else
							{
								Demo.PlayersTeam2.Add(pl);
							}
						});
					}
				}
			}
			CreateNewRound();
		}
Пример #7
0
		protected override void HandleRoundStart(object sender, RoundStartedEventArgs e)
		{
			if (_playerTeamCount > 8) IsMatchStarted = true;
			if (!IsMatchStarted) return;
			_isRoundOffiallyEndedOccured = false;

			// Reset until both scores > 0
			if (Parser.CTScore == 0 && Parser.TScore == 0)
			{
				Demo.ResetStats(false);
				RoundCount = 0;
				AddTeams();
			}

			CreateNewRound();

			if (Demo.ScoreTeam1 + Demo.ScoreTeam2 == 15) IsHalfMatch = true;

			if(!IsOvertime) return;

			_playerTeamCount = 0;
		}
Пример #8
0
		protected override void HandleRoundStart(object sender, RoundStartedEventArgs e)
		{
			_roundStartedCount++;

			// Beginning of the first round of the game
			if (Parser.TScore == 0 && Parser.CTScore == 0) AddTeams();

			// Check for the first LO3
			if (!IsOvertime && !_firstLo3Occured && !IsHalfMatch && _roundStartedCount >= 3)
			{
				_firstLo3Occured = true;
				IsMatchStarted = true;
			}

			// Check for the LO3 occured after the first LO3 (there are 4 round_start events)
			if (_firstLo3Occured && _roundStartedCount >= 4) IsMatchStarted = true;

			if (_isLastRoundFinal) _isLastRoundFinal = false;

			if (!IsMatchStarted) return;

			CreateNewRound();
		}
Пример #9
0
		protected override void HandleRoundStart(object sender, RoundStartedEventArgs e)
		{
			if (_playerTeamCount > 8) IsMatchStarted = true;
			if (!IsMatchStarted) return;
			_isRoundOffiallyEndedOccured = false;

			// Detect new OT for FaceIt demos
			if (_isFaceit && IsOvertime && _isFinalRound)
			{
				Application.Current.Dispatcher.Invoke(delegate
				{
					Demo.Overtimes.Add(CurrentOvertime);
				});
				CurrentOvertime = new Overtime
				{
					Number = ++OvertimeCount
				};
				IsHalfMatch = false;
			}
			_isFinalRound = false;

			// First OT detection for FaceIt demos
			if (Parser.CTScore + Parser.TScore == 30)
			{
				IsOvertime = true;
				CurrentOvertime = new Overtime
				{
					Number = ++OvertimeCount
				};
			}

			// Reset until both scores > 0
			if (Parser.CTScore == 0 && Parser.TScore == 0)
			{
				Demo.ResetStats(false);
				RoundCount = 0;
				AddTeams();
			}

			CreateNewRound();

			if (Demo.ScoreTeam1 + Demo.ScoreTeam2 == 15) IsHalfMatch = true;

			if(!IsOvertime) return;

			_playerTeamCount = 0;
		}
Пример #10
0
		protected override void HandleRoundStart(object sender, RoundStartedEventArgs e)
		{
			if (!IsMatchStarted) return;

			IsFreezetime = true;

			CreateNewRound();
		}