protected void HandleSmokeNadeEnded(object sender, SmokeEventArgs e) { if (!AnalyzePlayersPosition || !IsMatchStarted || e.ThrownBy == null) return; SmokeNadeEndedEvent smokeEvent = new SmokeNadeEndedEvent(Parser.IngameTick) { Thrower = Demo.Players.FirstOrDefault(player => player.SteamId == e.ThrownBy.SteamID) }; if (smokeEvent.Thrower != null) { PositionPoint positionPoint = new PositionPoint { X = e.Position.X, Y = e.Position.Y, Player = Demo.Players.First(p => p.SteamId == e.ThrownBy.SteamID), Team = e.ThrownBy.Team, Event = smokeEvent, Round = CurrentRound }; Demo.PositionsPoint.Add(positionPoint); } }
protected void HandleSmokeNadeEnded(object sender, SmokeEventArgs e) { if (!AnalyzePlayersPosition || !IsMatchStarted || e.ThrownBy == null) return; PlayerExtended thrower = Demo.Players.FirstOrDefault(player => player.SteamId == e.ThrownBy.SteamID); SmokeNadeEndedEvent smokeEvent = new SmokeNadeEndedEvent(Parser.IngameTick, Parser.CurrentTime) { ThrowerSteamId = thrower?.SteamId ?? 0, ThrowerName = thrower == null ? string.Empty : thrower.Name }; if (thrower != null) { PositionPoint positionPoint = new PositionPoint { X = e.Position.X, Y = e.Position.Y, PlayerName = e.ThrownBy.Name, PlayerSteamId = e.ThrownBy.SteamID, Team = e.ThrownBy.Team, Event = smokeEvent, RoundNumber = CurrentRound.Number }; Demo.PositionsPoint.Add(positionPoint); } }