Documentation ¶
Index ¶
- Variables
- func AddEntityProperty(entity *stfake.Entity, propName string, value st.PropertyValue) *stfake.Entity
- func AnglePlayerMovedFromPlayer(frame, oldFrame Frame, steamIDAimer uint64, steamIDvictim uint64) (float64, float64)
- func ComputeCoefAlive(players map[uint64]*PlayerEvent, teamCurrentPlayer int) float64
- func ComputeMultiplicatorAttack(players map[uint64]*PlayerEvent, ...) float64
- func ComputeStuffValue(grenades []string) int
- func ComputeTeamsAlive(players map[uint64]*PlayerEvent, teamCurrentPlayer int) (int, int)
- func CountAliveAllies(players map[uint64]*PlayerEvent, teamCurrentPlayer common.Team) int
- func CountAliveEnnemies(players map[uint64]*PlayerEvent, teamCurrentPlayer common.Team) int
- func EntityWithProperty(id int64, propName string, value st.PropertyValue) *stfake.Entity
- func GetConstTeamNum(side, numRound int) int
- func GetGeneralDataFromPlayer(playerCommon *common.Player, playersEvent map[uint64]*PlayerEvent) (string, uint64, int, int)
- func GetSideFromTeam(team, numRound int) int
- func GetZ(a, b r3.Vector) (r3.Vector, r3.Vector, r3.Vector)
- type Assist
- type AssistsScore
- type AttackScore
- type BombDefusedEvent
- type BombExplodeEvent
- type BombPlantedEvent
- type BulletStats
- type ChatMessage
- type ChatMessageEvent
- type Death
- type DemoInfoProviderMock
- func (p DemoInfoProviderMock) FindPlayerByHandle(handle int) *common.Player
- func (p DemoInfoProviderMock) FindWeaponByEntityID(id int) *common.Equipment
- func (p DemoInfoProviderMock) IngameTick() int
- func (p DemoInfoProviderMock) PlayerResourceEntity() st.Entity
- func (p DemoInfoProviderMock) TickRate() float64
- type Duel
- type DuelIndex
- type EventAnalyzer
- type EventType
- type Flash
- type Frame
- type Game
- type Grenade
- type GrenadeProjectileThrowEvent
- type GrenadeState
- type HeatMapDmg
- type HeatMapKill
- type ItemDropEvent
- type Kill
- type KillEvent
- type Mark
- func (m *Mark) AddKill(weapon common.EquipmentType)
- func (m *Mark) AddShoot(weapon common.EquipmentType, velocity int, isFirstBullet bool)
- func (m *Mark) AddShootHit(isHS bool, healthDamage int, weapon common.EquipmentType, velocity int, ...)
- func (m *Mark) AddStuffLost(stuffValue int, weapon common.EquipmentType)
- func (m *Mark) ConvertDB(demoID *int64) *model.Marks
- type MarksPerRound
- func (mpr *MarksPerRound) AddDeath()
- func (mpr *MarksPerRound) AddKill()
- func (mpr *MarksPerRound) AddShoot(weapon common.EquipmentType, velocity int, isFirstBullet bool)
- func (mpr *MarksPerRound) AddShootHit(isHS bool, healthDamage int, weapon common.EquipmentType, velocity int, ...)
- func (mpr *MarksPerRound) ConvertDB() *model.MarksPerRound
- type PickUpItemEvent
- type Player
- func (p *Player) AddWeaponFirePattern(weaponType common.EquipmentType, frame *Frame, playrAimer *PlayerEvent, ...)
- func (p *Player) ComputeFlashScore(nbrRounds int)
- func (p *Player) ComputeMatrixFlashs(teams map[int]*Team) []*model.MatrixFlashs
- func (p *Player) ComputeMatrixKills(teams map[int]*Team) []*model.MatrixKills
- func (p *Player) ComputeWeaponPatterns(idTest int64) []*model.WeaponPattern
- func (p *Player) CountNbrEnnemiesKillAssisted() *int
- func (p *Player) CountNbrEnnemiesKilled() *int
- type PlayerEvent
- type PlayerFlashed
- type PlayerFlashedEvent
- type PlayerHurtEvent
- type Round
- func (r *Round) ComputeMatrixSightWithLag(frame Frame, steamIDPlayer uint64) *mat.Dense
- func (r *Round) ConvertDBChatMessage() []*model.ChatMessage
- func (r *Round) GetDeltasCrossHairPlacement(currentFrame Frame, steamIDToFind uint64) (float64, float64)
- func (r *Round) GetOldFrame(currentFrame Frame, duration time.Duration) *Frame
- func (r *Round) IsDistancePlayersFromSightAtAMinimum(frame Frame, steamIDPlayer uint64, distanceMinimum float64) (bool, []*PlayerEvent)
- type RoundFreezetimeEndEvent
- type ScoreFacts
- type StatsFlashs
- type Team
- type WeaponFireEvent
- type WeaponMark
- func (wm *WeaponMark) AddDeath()
- func (wm *WeaponMark) AddKill()
- func (wm *WeaponMark) AddShoot(isFirstBullet bool, velocity int)
- func (wm *WeaponMark) AddShootHit(isHS bool, isFirstBullet bool, velocity int, deltaX, deltaY float64)
- func (wm *WeaponMark) ConvertDB(weaponType common.EquipmentType) *model.WeaponMarks
- type WeaponPattern
Constants ¶
This section is empty.
Variables ¶
var PerfectPatterns = map[common.EquipmentType][]*model.BulletStats{ common.EqAK47: { {BulletNumber: 0, CumulativeDeltaX: 0.0, CumulativeDeltaY: 0.0}, {BulletNumber: 1, CumulativeDeltaX: 0.0, CumulativeDeltaY: -0.3}, {BulletNumber: 2, CumulativeDeltaX: 0.0, CumulativeDeltaY: -0.78}, {BulletNumber: 3, CumulativeDeltaX: -0.06, CumulativeDeltaY: -1.52}, {BulletNumber: 4, CumulativeDeltaX: -0.02, CumulativeDeltaY: -2.55}, {BulletNumber: 5, CumulativeDeltaX: 0.25, CumulativeDeltaY: -3.31}, {BulletNumber: 6, CumulativeDeltaX: 0.59, CumulativeDeltaY: -4.27}, {BulletNumber: 7, CumulativeDeltaX: 0.75, CumulativeDeltaY: -4.59}, {BulletNumber: 8, CumulativeDeltaX: 0.270, CumulativeDeltaY: -4.86}, {BulletNumber: 9, CumulativeDeltaX: -0.88, CumulativeDeltaY: -4.98}, {BulletNumber: 10, CumulativeDeltaX: -1.31, CumulativeDeltaY: -5}, {BulletNumber: 11, CumulativeDeltaX: -1.54, CumulativeDeltaY: -5.03}, {BulletNumber: 12, CumulativeDeltaX: -1.81, CumulativeDeltaY: -5.05}, {BulletNumber: 13, CumulativeDeltaX: -2.09, CumulativeDeltaY: -4.97}, {BulletNumber: 14, CumulativeDeltaX: -2.06, CumulativeDeltaY: -5.19}, {BulletNumber: 15, CumulativeDeltaX: -1.06, CumulativeDeltaY: -5.52}, {BulletNumber: 16, CumulativeDeltaX: -0.63, CumulativeDeltaY: -5.41}, {BulletNumber: 17, CumulativeDeltaX: -0.03, CumulativeDeltaY: -5.61}, {BulletNumber: 18, CumulativeDeltaX: 0.61, CumulativeDeltaY: -5.59}, {BulletNumber: 19, CumulativeDeltaX: 1.04, CumulativeDeltaY: -5.47}, {BulletNumber: 20, CumulativeDeltaX: 1.31, CumulativeDeltaY: -5.41}, {BulletNumber: 21, CumulativeDeltaX: 1.10, CumulativeDeltaY: -5.53}, {BulletNumber: 22, CumulativeDeltaX: 1.01, CumulativeDeltaY: -5.6}, {BulletNumber: 23, CumulativeDeltaX: 1.01, CumulativeDeltaY: -5.69}, {BulletNumber: 24, CumulativeDeltaX: 1.13, CumulativeDeltaY: -5.71}, {BulletNumber: 25, CumulativeDeltaX: 1.19, CumulativeDeltaY: -5.78}, {BulletNumber: 26, CumulativeDeltaX: 0.69, CumulativeDeltaY: -5.72}, {BulletNumber: 27, CumulativeDeltaX: -0.45, CumulativeDeltaY: -5.67}, {BulletNumber: 28, CumulativeDeltaX: -1.38, CumulativeDeltaY: -5.13}, {BulletNumber: 29, CumulativeDeltaX: -1.70, CumulativeDeltaY: -5.27}, }, common.EqM4A4: { {BulletNumber: 0, CumulativeDeltaX: 0.0, CumulativeDeltaY: 0.0}, {BulletNumber: 1, CumulativeDeltaX: 0.0, CumulativeDeltaY: -0.06}, {BulletNumber: 2, CumulativeDeltaX: 0.0, CumulativeDeltaY: -0.44}, {BulletNumber: 3, CumulativeDeltaX: -0.03, CumulativeDeltaY: -1.05}, {BulletNumber: 4, CumulativeDeltaX: 0, CumulativeDeltaY: -1.59}, {BulletNumber: 5, CumulativeDeltaX: -0.16, CumulativeDeltaY: -2.06}, {BulletNumber: 6, CumulativeDeltaX: -0.16, CumulativeDeltaY: -2.91}, {BulletNumber: 7, CumulativeDeltaX: 0.20, CumulativeDeltaY: -3.34}, {BulletNumber: 8, CumulativeDeltaX: 0.53, CumulativeDeltaY: -3.63}, {BulletNumber: 9, CumulativeDeltaX: 1, CumulativeDeltaY: -3.63}, {BulletNumber: 10, CumulativeDeltaX: 0.84, CumulativeDeltaY: -3.92}, {BulletNumber: 11, CumulativeDeltaX: 0.31, CumulativeDeltaY: -4.16}, {BulletNumber: 12, CumulativeDeltaX: -0.47, CumulativeDeltaY: -4.09}, {BulletNumber: 13, CumulativeDeltaX: -1.09, CumulativeDeltaY: -3.98}, {BulletNumber: 14, CumulativeDeltaX: -1.72, CumulativeDeltaY: -3.84}, {BulletNumber: 15, CumulativeDeltaX: -1.71, CumulativeDeltaY: -4.01}, {BulletNumber: 16, CumulativeDeltaX: -1.68, CumulativeDeltaY: -4.11}, {BulletNumber: 17, CumulativeDeltaX: -1.86, CumulativeDeltaY: -4.05}, {BulletNumber: 18, CumulativeDeltaX: -2.17, CumulativeDeltaY: -3.98}, {BulletNumber: 19, CumulativeDeltaX: -2, CumulativeDeltaY: -4.13}, {BulletNumber: 20, CumulativeDeltaX: -1.14, CumulativeDeltaY: -4.25}, {BulletNumber: 21, CumulativeDeltaX: -0.77, CumulativeDeltaY: -4.34}, {BulletNumber: 22, CumulativeDeltaX: -0.19, CumulativeDeltaY: -4.22}, {BulletNumber: 23, CumulativeDeltaX: 0.09, CumulativeDeltaY: -4.44}, {BulletNumber: 24, CumulativeDeltaX: 0.21, CumulativeDeltaY: -4.49}, {BulletNumber: 25, CumulativeDeltaX: 0.12, CumulativeDeltaY: -4.58}, {BulletNumber: 26, CumulativeDeltaX: 0.19, CumulativeDeltaY: -4.67}, {BulletNumber: 27, CumulativeDeltaX: 0.30, CumulativeDeltaY: -4.68}, {BulletNumber: 28, CumulativeDeltaX: 0.41, CumulativeDeltaY: -4.69}, {BulletNumber: 29, CumulativeDeltaX: 0.44, CumulativeDeltaY: -4.69}, }, common.EqAUG: { {BulletNumber: 0, CumulativeDeltaX: 0.0, CumulativeDeltaY: 0.0}, {BulletNumber: 1, CumulativeDeltaX: 0.03, CumulativeDeltaY: -0.19}, {BulletNumber: 2, CumulativeDeltaX: 0.06, CumulativeDeltaY: -0.33}, {BulletNumber: 3, CumulativeDeltaX: -0.03, CumulativeDeltaY: -0.88}, {BulletNumber: 4, CumulativeDeltaX: -0.16, CumulativeDeltaY: -1.42}, {BulletNumber: 5, CumulativeDeltaX: 0, CumulativeDeltaY: -2.23}, {BulletNumber: 6, CumulativeDeltaX: 0.19, CumulativeDeltaY: -2.78}, {BulletNumber: 7, CumulativeDeltaX: 0.47, CumulativeDeltaY: -3.13}, {BulletNumber: 8, CumulativeDeltaX: 0.63, CumulativeDeltaY: -3.5}, {BulletNumber: 9, CumulativeDeltaX: 0.86, CumulativeDeltaY: -3.63}, {BulletNumber: 10, CumulativeDeltaX: 0.45, CumulativeDeltaY: -3.83}, {BulletNumber: 11, CumulativeDeltaX: 0.39, CumulativeDeltaY: -3.87}, {BulletNumber: 12, CumulativeDeltaX: 0.33, CumulativeDeltaY: -3.91}, {BulletNumber: 13, CumulativeDeltaX: 0.23, CumulativeDeltaY: -3.94}, {BulletNumber: 14, CumulativeDeltaX: 0.09, CumulativeDeltaY: -3.97}, {BulletNumber: 15, CumulativeDeltaX: -0.69, CumulativeDeltaY: -3.81}, {BulletNumber: 16, CumulativeDeltaX: -1.39, CumulativeDeltaY: -3.72}, {BulletNumber: 17, CumulativeDeltaX: -1.31, CumulativeDeltaY: -3.8}, {BulletNumber: 18, CumulativeDeltaX: -1.41, CumulativeDeltaY: -3.84}, {BulletNumber: 19, CumulativeDeltaX: -1.27, CumulativeDeltaY: -3.88}, {BulletNumber: 20, CumulativeDeltaX: -0.97, CumulativeDeltaY: -3.97}, {BulletNumber: 21, CumulativeDeltaX: -0.13, CumulativeDeltaY: -4.00}, {BulletNumber: 22, CumulativeDeltaX: -0.06, CumulativeDeltaY: -4.04}, {BulletNumber: 23, CumulativeDeltaX: 0.03, CumulativeDeltaY: -4.09}, {BulletNumber: 24, CumulativeDeltaX: 0.22, CumulativeDeltaY: -4.00}, {BulletNumber: 25, CumulativeDeltaX: 0.91, CumulativeDeltaY: -3.84}, {BulletNumber: 26, CumulativeDeltaX: 1.28, CumulativeDeltaY: -3.91}, {BulletNumber: 27, CumulativeDeltaX: 0.88, CumulativeDeltaY: -3.98}, {BulletNumber: 28, CumulativeDeltaX: 0.48, CumulativeDeltaY: -4.08}, {BulletNumber: 29, CumulativeDeltaX: 0.33, CumulativeDeltaY: -4.12}, }, common.EqM4A1: { {BulletNumber: 0, CumulativeDeltaX: 0.0, CumulativeDeltaY: 0.0}, {BulletNumber: 1, CumulativeDeltaX: 0.00, CumulativeDeltaY: -0.19}, {BulletNumber: 2, CumulativeDeltaX: 0.00, CumulativeDeltaY: -0.19}, {BulletNumber: 3, CumulativeDeltaX: -0.03, CumulativeDeltaY: -0.63}, {BulletNumber: 4, CumulativeDeltaX: 0.02, CumulativeDeltaY: -1.03}, {BulletNumber: 5, CumulativeDeltaX: -0.09, CumulativeDeltaY: -1.5}, {BulletNumber: 6, CumulativeDeltaX: -0.13, CumulativeDeltaY: -2.16}, {BulletNumber: 7, CumulativeDeltaX: 0.16, CumulativeDeltaY: -2.42}, {BulletNumber: 8, CumulativeDeltaX: 0.41, CumulativeDeltaY: -2.72}, {BulletNumber: 9, CumulativeDeltaX: 0.78, CumulativeDeltaY: -2.69}, {BulletNumber: 10, CumulativeDeltaX: 0.63, CumulativeDeltaY: -2.91}, {BulletNumber: 11, CumulativeDeltaX: 0.13, CumulativeDeltaY: -3.13}, {BulletNumber: 12, CumulativeDeltaX: -0.38, CumulativeDeltaY: -2.97}, {BulletNumber: 13, CumulativeDeltaX: -0.94, CumulativeDeltaY: -2.94}, {BulletNumber: 14, CumulativeDeltaX: -1.28, CumulativeDeltaY: -2.75}, {BulletNumber: 15, CumulativeDeltaX: -1.43, CumulativeDeltaY: -2.79}, {BulletNumber: 16, CumulativeDeltaX: -1.55, CumulativeDeltaY: -2.88}, {BulletNumber: 17, CumulativeDeltaX: -1.60, CumulativeDeltaY: -3.01}, {BulletNumber: 18, CumulativeDeltaX: -1.55, CumulativeDeltaY: -3.13}, {BulletNumber: 19, CumulativeDeltaX: -1.35, CumulativeDeltaY: -3.15}, {BulletNumber: 20, CumulativeDeltaX: -0.80, CumulativeDeltaY: -3.15}, {BulletNumber: 21, CumulativeDeltaX: -0.44, CumulativeDeltaY: -3.22}, {BulletNumber: 22, CumulativeDeltaX: 0.00, CumulativeDeltaY: -3.17}, {BulletNumber: 23, CumulativeDeltaX: 0.14, CumulativeDeltaY: -3.25}, {BulletNumber: 24, CumulativeDeltaX: 0.30, CumulativeDeltaY: -3.23}, }, common.EqSG553: { {BulletNumber: 0, CumulativeDeltaX: 0.0, CumulativeDeltaY: 0.0}, {BulletNumber: 1, CumulativeDeltaX: -0.08, CumulativeDeltaY: -0.14}, {BulletNumber: 2, CumulativeDeltaX: -0.42, CumulativeDeltaY: -0.63}, {BulletNumber: 3, CumulativeDeltaX: -0.67, CumulativeDeltaY: -1.34}, {BulletNumber: 4, CumulativeDeltaX: -0.89, CumulativeDeltaY: -2.19}, {BulletNumber: 5, CumulativeDeltaX: -1.13, CumulativeDeltaY: -3.19}, {BulletNumber: 6, CumulativeDeltaX: -1.34, CumulativeDeltaY: -3.97}, {BulletNumber: 7, CumulativeDeltaX: -1.77, CumulativeDeltaY: -4.33}, {BulletNumber: 8, CumulativeDeltaX: 1.47, CumulativeDeltaY: -4.81}, {BulletNumber: 9, CumulativeDeltaX: -1.70, CumulativeDeltaY: -5.09}, {BulletNumber: 10, CumulativeDeltaX: -2.06, CumulativeDeltaY: -5.22}, {BulletNumber: 11, CumulativeDeltaX: -2.20, CumulativeDeltaY: -5.42}, {BulletNumber: 12, CumulativeDeltaX: -2.13, CumulativeDeltaY: -5.66}, {BulletNumber: 13, CumulativeDeltaX: -2.28, CumulativeDeltaY: -5.83}, {BulletNumber: 14, CumulativeDeltaX: -2.20, CumulativeDeltaY: -5.89}, {BulletNumber: 15, CumulativeDeltaX: -2.75, CumulativeDeltaY: -5.86}, {BulletNumber: 16, CumulativeDeltaX: -3.30, CumulativeDeltaY: -5.45}, {BulletNumber: 17, CumulativeDeltaX: -3.61, CumulativeDeltaY: -5.16}, {BulletNumber: 18, CumulativeDeltaX: -3.67, CumulativeDeltaY: -5.03}, {BulletNumber: 19, CumulativeDeltaX: -2.45, CumulativeDeltaY: -5.27}, {BulletNumber: 20, CumulativeDeltaX: -1.00, CumulativeDeltaY: -5.13}, {BulletNumber: 21, CumulativeDeltaX: 0.06, CumulativeDeltaY: -5.09}, {BulletNumber: 22, CumulativeDeltaX: 0.47, CumulativeDeltaY: -5.22}, {BulletNumber: 23, CumulativeDeltaX: 0.84, CumulativeDeltaY: -5.52}, {BulletNumber: 24, CumulativeDeltaX: 1.06, CumulativeDeltaY: -5.73}, {BulletNumber: 25, CumulativeDeltaX: 1.81, CumulativeDeltaY: -5.81}, {BulletNumber: 26, CumulativeDeltaX: 2.38, CumulativeDeltaY: -5.53}, {BulletNumber: 27, CumulativeDeltaX: 2.14, CumulativeDeltaY: -5.70}, {BulletNumber: 28, CumulativeDeltaX: 1.66, CumulativeDeltaY: -5.91}, {BulletNumber: 29, CumulativeDeltaX: 0.70, CumulativeDeltaY: -5.78}, }, common.EqFamas: { {BulletNumber: 0, CumulativeDeltaX: 0.0, CumulativeDeltaY: 0.0}, {BulletNumber: 1, CumulativeDeltaX: -0.03, CumulativeDeltaY: -0.03}, {BulletNumber: 2, CumulativeDeltaX: -0.09, CumulativeDeltaY: -0.19}, {BulletNumber: 3, CumulativeDeltaX: -0.22, CumulativeDeltaY: -0.44}, {BulletNumber: 4, CumulativeDeltaX: -0.25, CumulativeDeltaY: -1.06}, {BulletNumber: 5, CumulativeDeltaX: -0.19, CumulativeDeltaY: -1.63}, {BulletNumber: 6, CumulativeDeltaX: 0.19, CumulativeDeltaY: -2.06}, {BulletNumber: 7, CumulativeDeltaX: 0.50, CumulativeDeltaY: -2.41}, {BulletNumber: 8, CumulativeDeltaX: 0.28, CumulativeDeltaY: -2.75}, {BulletNumber: 9, CumulativeDeltaX: -0.13, CumulativeDeltaY: -2.81}, {BulletNumber: 10, CumulativeDeltaX: -0.66, CumulativeDeltaY: -3.00}, {BulletNumber: 11, CumulativeDeltaX: -0.94, CumulativeDeltaY: -3.13}, {BulletNumber: 12, CumulativeDeltaX: -0.81, CumulativeDeltaY: -3.22}, {BulletNumber: 13, CumulativeDeltaX: -0.19, CumulativeDeltaY: -3.28}, {BulletNumber: 14, CumulativeDeltaX: 0.19, CumulativeDeltaY: -3.44}, {BulletNumber: 15, CumulativeDeltaX: 0.59, CumulativeDeltaY: -3.34}, {BulletNumber: 16, CumulativeDeltaX: 0.88, CumulativeDeltaY: -3.47}, {BulletNumber: 17, CumulativeDeltaX: 1.19, CumulativeDeltaY: -3.41}, {BulletNumber: 18, CumulativeDeltaX: 1.10, CumulativeDeltaY: -3.47}, {BulletNumber: 19, CumulativeDeltaX: 0.99, CumulativeDeltaY: -3.50}, {BulletNumber: 20, CumulativeDeltaX: 0.50, CumulativeDeltaY: -3.56}, {BulletNumber: 21, CumulativeDeltaX: 0.47, CumulativeDeltaY: -3.69}, {BulletNumber: 22, CumulativeDeltaX: 0.75, CumulativeDeltaY: -3.59}, {BulletNumber: 23, CumulativeDeltaX: 1.19, CumulativeDeltaY: -3.47}, {BulletNumber: 24, CumulativeDeltaX: 1.53, CumulativeDeltaY: -3.16}, }, common.EqGalil: { {BulletNumber: 0, CumulativeDeltaX: 0.00, CumulativeDeltaY: 0.0}, {BulletNumber: 1, CumulativeDeltaX: 0.00, CumulativeDeltaY: -0.09}, {BulletNumber: 2, CumulativeDeltaX: 0.03, CumulativeDeltaY: -0.16}, {BulletNumber: 3, CumulativeDeltaX: 0.25, CumulativeDeltaY: -0.53}, {BulletNumber: 4, CumulativeDeltaX: 0.53, CumulativeDeltaY: -1.03}, {BulletNumber: 5, CumulativeDeltaX: 0.53, CumulativeDeltaY: -1.75}, {BulletNumber: 6, CumulativeDeltaX: 0.53, CumulativeDeltaY: -2.09}, {BulletNumber: 7, CumulativeDeltaX: 0.78, CumulativeDeltaY: -2.69}, {BulletNumber: 8, CumulativeDeltaX: 1.00, CumulativeDeltaY: -3.06}, {BulletNumber: 9, CumulativeDeltaX: 0.81, CumulativeDeltaY: -3.31}, {BulletNumber: 10, CumulativeDeltaX: 0.16, CumulativeDeltaY: -3.44}, {BulletNumber: 11, CumulativeDeltaX: -0.47, CumulativeDeltaY: -3.31}, {BulletNumber: 12, CumulativeDeltaX: -1.28, CumulativeDeltaY: -3.06}, {BulletNumber: 13, CumulativeDeltaX: -1.59, CumulativeDeltaY: -3.28}, {BulletNumber: 14, CumulativeDeltaX: -1.88, CumulativeDeltaY: -3.31}, {BulletNumber: 15, CumulativeDeltaX: -2.06, CumulativeDeltaY: -3.34}, {BulletNumber: 16, CumulativeDeltaX: -2.03, CumulativeDeltaY: -3.34}, {BulletNumber: 17, CumulativeDeltaX: -1.81, CumulativeDeltaY: -3.63}, {BulletNumber: 18, CumulativeDeltaX: -1.16, CumulativeDeltaY: -3.72}, {BulletNumber: 19, CumulativeDeltaX: -0.72, CumulativeDeltaY: -3.84}, {BulletNumber: 20, CumulativeDeltaX: -0.03, CumulativeDeltaY: -3.75}, {BulletNumber: 21, CumulativeDeltaX: 0.38, CumulativeDeltaY: -3.66}, {BulletNumber: 22, CumulativeDeltaX: 0.51, CumulativeDeltaY: -3.64}, {BulletNumber: 23, CumulativeDeltaX: 0.56, CumulativeDeltaY: -3.72}, {BulletNumber: 24, CumulativeDeltaX: 0.88, CumulativeDeltaY: -3.72}, {BulletNumber: 25, CumulativeDeltaX: 1.19, CumulativeDeltaY: -3.72}, {BulletNumber: 26, CumulativeDeltaX: 1.53, CumulativeDeltaY: -3.53}, {BulletNumber: 27, CumulativeDeltaX: 1.16, CumulativeDeltaY: -3.66}, {BulletNumber: 28, CumulativeDeltaX: 0.28, CumulativeDeltaY: -3.53}, {BulletNumber: 29, CumulativeDeltaX: -0.28, CumulativeDeltaY: -3.53}, {BulletNumber: 30, CumulativeDeltaX: -0.63, CumulativeDeltaY: -3.63}, {BulletNumber: 31, CumulativeDeltaX: -0.78, CumulativeDeltaY: -3.68}, {BulletNumber: 32, CumulativeDeltaX: -0.97, CumulativeDeltaY: -3.66}, {BulletNumber: 33, CumulativeDeltaX: -1.56, CumulativeDeltaY: -3.31}, {BulletNumber: 34, CumulativeDeltaX: 1.81, CumulativeDeltaY: -3.19}, }, common.EqMP9: { {BulletNumber: 0, CumulativeDeltaX: 0.00, CumulativeDeltaY: 0.0}, {BulletNumber: 1, CumulativeDeltaX: -0.03, CumulativeDeltaY: -0.16}, {BulletNumber: 2, CumulativeDeltaX: -0.03, CumulativeDeltaY: -0.16}, {BulletNumber: 3, CumulativeDeltaX: 0.00, CumulativeDeltaY: -0.59}, {BulletNumber: 4, CumulativeDeltaX: -0.03, CumulativeDeltaY: -1.03}, {BulletNumber: 5, CumulativeDeltaX: 0.19, CumulativeDeltaY: -1.72}, {BulletNumber: 6, CumulativeDeltaX: 0.13, CumulativeDeltaY: -2.31}, {BulletNumber: 7, CumulativeDeltaX: 0.00, CumulativeDeltaY: -2.75}, {BulletNumber: 8, CumulativeDeltaX: 0.44, CumulativeDeltaY: -3.31}, {BulletNumber: 9, CumulativeDeltaX: 0.91, CumulativeDeltaY: -3.44}, {BulletNumber: 10, CumulativeDeltaX: 1.41, CumulativeDeltaY: -3.41}, {BulletNumber: 11, CumulativeDeltaX: 2.09, CumulativeDeltaY: -3.31}, {BulletNumber: 12, CumulativeDeltaX: 2.06, CumulativeDeltaY: -3.50}, {BulletNumber: 13, CumulativeDeltaX: 2.00, CumulativeDeltaY: -3.88}, {BulletNumber: 14, CumulativeDeltaX: 1.38, CumulativeDeltaY: -4.09}, {BulletNumber: 15, CumulativeDeltaX: 1.03, CumulativeDeltaY: -4.31}, {BulletNumber: 16, CumulativeDeltaX: 0.59, CumulativeDeltaY: -4.41}, {BulletNumber: 17, CumulativeDeltaX: -0.16, CumulativeDeltaY: -4.66}, {BulletNumber: 18, CumulativeDeltaX: -0.47, CumulativeDeltaY: -4.56}, {BulletNumber: 19, CumulativeDeltaX: -1.06, CumulativeDeltaY: -4.38}, {BulletNumber: 20, CumulativeDeltaX: -0.94, CumulativeDeltaY: -4.34}, {BulletNumber: 21, CumulativeDeltaX: -0.56, CumulativeDeltaY: -4.44}, {BulletNumber: 22, CumulativeDeltaX: 0.00, CumulativeDeltaY: -4.56}, {BulletNumber: 23, CumulativeDeltaX: 0.06, CumulativeDeltaY: -4.63}, {BulletNumber: 24, CumulativeDeltaX: -0.50, CumulativeDeltaY: -4.59}, {BulletNumber: 25, CumulativeDeltaX: -1.03, CumulativeDeltaY: -4.38}, {BulletNumber: 26, CumulativeDeltaX: -1.31, CumulativeDeltaY: -4.50}, {BulletNumber: 27, CumulativeDeltaX: -1.50, CumulativeDeltaY: -4.47}, {BulletNumber: 28, CumulativeDeltaX: -1.25, CumulativeDeltaY: -4.66}, {BulletNumber: 29, CumulativeDeltaX: -1.09, CumulativeDeltaY: -4.69}, }, common.EqMac10: { {BulletNumber: 0, CumulativeDeltaX: 0.00, CumulativeDeltaY: 0.0}, {BulletNumber: 1, CumulativeDeltaX: -0.09, CumulativeDeltaY: -0.13}, {BulletNumber: 2, CumulativeDeltaX: -0.03, CumulativeDeltaY: -0.19}, {BulletNumber: 3, CumulativeDeltaX: -0.03, CumulativeDeltaY: -0.25}, {BulletNumber: 4, CumulativeDeltaX: 0.00, CumulativeDeltaY: -0.69}, {BulletNumber: 5, CumulativeDeltaX: 0.34, CumulativeDeltaY: -1.28}, {BulletNumber: 6, CumulativeDeltaX: 0.63, CumulativeDeltaY: -1.88}, {BulletNumber: 7, CumulativeDeltaX: 0.81, CumulativeDeltaY: -2.44}, {BulletNumber: 8, CumulativeDeltaX: 0.69, CumulativeDeltaY: -2.78}, {BulletNumber: 9, CumulativeDeltaX: 0.91, CumulativeDeltaY: -3.09}, {BulletNumber: 10, CumulativeDeltaX: 1.06, CumulativeDeltaY: -3.50}, {BulletNumber: 11, CumulativeDeltaX: 1.13, CumulativeDeltaY: -3.72}, {BulletNumber: 12, CumulativeDeltaX: 1.06, CumulativeDeltaY: -3.88}, {BulletNumber: 13, CumulativeDeltaX: 1.00, CumulativeDeltaY: -3.97}, {BulletNumber: 14, CumulativeDeltaX: 0.78, CumulativeDeltaY: -4.09}, {BulletNumber: 15, CumulativeDeltaX: 0.06, CumulativeDeltaY: -4.09}, {BulletNumber: 16, CumulativeDeltaX: -0.53, CumulativeDeltaY: -3.84}, {BulletNumber: 17, CumulativeDeltaX: -0.65, CumulativeDeltaY: -3.81}, {BulletNumber: 18, CumulativeDeltaX: -0.88, CumulativeDeltaY: -3.78}, {BulletNumber: 19, CumulativeDeltaX: -0.79, CumulativeDeltaY: -3.84}, {BulletNumber: 20, CumulativeDeltaX: -0.97, CumulativeDeltaY: -3.88}, {BulletNumber: 21, CumulativeDeltaX: -1.31, CumulativeDeltaY: -3.81}, {BulletNumber: 22, CumulativeDeltaX: -1.44, CumulativeDeltaY: -3.78}, {BulletNumber: 23, CumulativeDeltaX: -1.03, CumulativeDeltaY: -3.84}, {BulletNumber: 24, CumulativeDeltaX: -0.66, CumulativeDeltaY: -3.91}, {BulletNumber: 25, CumulativeDeltaX: -0.31, CumulativeDeltaY: -3.94}, {BulletNumber: 26, CumulativeDeltaX: 0.31, CumulativeDeltaY: -3.81}, {BulletNumber: 27, CumulativeDeltaX: 0.18, CumulativeDeltaY: -3.82}, {BulletNumber: 28, CumulativeDeltaX: -0.19, CumulativeDeltaY: -3.88}, {BulletNumber: 29, CumulativeDeltaX: -0.22, CumulativeDeltaY: -3.81}, }, }
PerfectPatterns slice of perfect pattern by weapon
Functions ¶
func AddEntityProperty ¶
func AddEntityProperty(entity *stfake.Entity, propName string, value st.PropertyValue) *stfake.Entity
AddEntityProperty add a property to an entity
func AnglePlayerMovedFromPlayer ¶
func AnglePlayerMovedFromPlayer( frame, oldFrame Frame, steamIDAimer uint64, steamIDvictim uint64, ) (float64, float64)
AnglePlayerMovedFromPlayer return the angle from both player in 2 differents frames
func ComputeCoefAlive ¶
func ComputeCoefAlive(players map[uint64]*PlayerEvent, teamCurrentPlayer int) float64
ComputeCoefAlive return the coef 1 + (nbrEnnemiesAlive-nbrAlliesAlive)/10
func ComputeMultiplicatorAttack ¶
func ComputeMultiplicatorAttack(players map[uint64]*PlayerEvent, equipmentValueAttacker, equipmentValueVictim int, teamCurrentPlayer int, won, teamKill bool) float64
ComputeMultiplicatorAttack return a coef for an attack event
func ComputeStuffValue ¶
ComputeStuffValue return in $ the value of the current stuff
func ComputeTeamsAlive ¶
func ComputeTeamsAlive(players map[uint64]*PlayerEvent, teamCurrentPlayer int) (int, int)
ComputeTeamsAlive return number of alive and ennemies alives
func CountAliveAllies ¶
func CountAliveAllies(players map[uint64]*PlayerEvent, teamCurrentPlayer common.Team) int
CountAliveAllies return number of allies
func CountAliveEnnemies ¶
func CountAliveEnnemies(players map[uint64]*PlayerEvent, teamCurrentPlayer common.Team) int
CountAliveEnnemies return number of ennemies
func EntityWithProperty ¶
EntityWithProperty create an new entity with a property
func GetConstTeamNum ¶
GetConstTeamNum returns the team from the side and the round number
func GetGeneralDataFromPlayer ¶
func GetGeneralDataFromPlayer(playerCommon *common.Player, playersEvent map[uint64]*PlayerEvent) (string, uint64, int, int)
GetGeneralDataFromPlayer return informations about player sent changes name to magic, bot or add bot if the player is controlling a bot
func GetSideFromTeam ¶
GetSideFromTeam returns the side from the team and the round number
Types ¶
type AssistsScore ¶
type AssistsScore struct { DropScore float64 FlashScore float64 RevangedScore float64 BombDefuseScore float64 BombPlantedScore float64 }
AssistsScore reflects how a player assists his team
func (AssistsScore) ComputeTotalScore ¶
func (as AssistsScore) ComputeTotalScore() float64
ComputeTotalScore calculate the total assist score
type AttackScore ¶
type AttackScore struct { DamageScore float64 KillScore float64 DeathScore float64 AssistKillScore float64 }
AttackScore reflects how a player was useful at BIG WARIOR
func (AttackScore) ComputeTotalScore ¶
func (as AttackScore) ComputeTotalScore() float64
ComputeTotalScore calculate the total attack score
type BombDefusedEvent ¶
type BombDefusedEvent struct { BombDefused events.BombDefused TimeRemainded time.Duration }
BombDefusedEvent event of a bomb defused
func (*BombDefusedEvent) GetType ¶
func (bde *BombDefusedEvent) GetType() EventType
GetType type of event
func (*BombDefusedEvent) HandleEvent ¶
HandleEvent return a bomb defused event, addind score
type BombExplodeEvent ¶
type BombExplodeEvent struct {
BombExplode events.BombExplode
}
BombExplodeEvent event when bomb explode
func (*BombExplodeEvent) GetType ¶
func (bee *BombExplodeEvent) GetType() EventType
GetType type of event
func (*BombExplodeEvent) HandleEvent ¶
HandleEvent return a bomb exploded event, addind score
type BombPlantedEvent ¶
type BombPlantedEvent struct { BombPlanted events.BombPlanted TimeEvent time.Duration }
BombPlantedEvent event of a bomb planted
func (*BombPlantedEvent) GetType ¶
func (bpe *BombPlantedEvent) GetType() EventType
GetType type of event
func (*BombPlantedEvent) HandleEvent ¶
HandleEvent return a bomb planted event, addind score
type BulletStats ¶
type BulletStats struct { BulletNumber int PlayerAimed *PlayerEvent FrameShoot *Frame Hit bool HitHS bool Kill bool ViewDirectionX float64 ViewDirectionY float64 DeltaX float64 DeltaY float64 }
BulletStats type with stats about bullet
type ChatMessage ¶
ChatMessage represents a message sent
func GenerateRandomChatMessage ¶
func GenerateRandomChatMessage() ChatMessage
GenerateRandomChatMessage generate a random ChatMessage
func GenerateRandomChatMessages ¶
func GenerateRandomChatMessages(nbrMessage int) []ChatMessage
GenerateRandomChatMessages generate randoms ChatMessages
func (*ChatMessage) ConvertForDB ¶
func (m *ChatMessage) ConvertForDB() *model.ChatMessage
ConvertForDB convert the message for the DB
type ChatMessageEvent ¶
type ChatMessageEvent struct { ChatMessage events.ChatMessage TimeEvent time.Duration }
ChatMessageEvent event when an item has been pickup
func (*ChatMessageEvent) GetType ¶
func (cme *ChatMessageEvent) GetType() EventType
GetType type of event
func (*ChatMessageEvent) HandleEvent ¶
HandleEvent return a model.Event, add score etc
type DemoInfoProviderMock ¶
type DemoInfoProviderMock struct {
// contains filtered or unexported fields
}
DemoInfoProviderMock mock struct demoinfo
func MockDemoInfoProvider ¶
func MockDemoInfoProvider(tickRate float64, tick int) DemoInfoProviderMock
MockDemoInfoProvider create a mock for demoInfoProvider
func (DemoInfoProviderMock) FindPlayerByHandle ¶
func (p DemoInfoProviderMock) FindPlayerByHandle(handle int) *common.Player
FindPlayerByHandle return the player by handle
func (DemoInfoProviderMock) FindWeaponByEntityID ¶
func (p DemoInfoProviderMock) FindWeaponByEntityID(id int) *common.Equipment
FindWeaponByEntityID return the weapon by ID
func (DemoInfoProviderMock) IngameTick ¶
func (p DemoInfoProviderMock) IngameTick() int
IngameTick return the ingameTick
func (DemoInfoProviderMock) PlayerResourceEntity ¶
func (p DemoInfoProviderMock) PlayerResourceEntity() st.Entity
PlayerResourceEntity return the entity of the player
func (DemoInfoProviderMock) TickRate ¶
func (p DemoInfoProviderMock) TickRate() float64
TickRate return the tickRate
type EventAnalyzer ¶
EventAnalyzer interface for all events
type Flash ¶
type Flash struct { Score float64 ScoreEnnemies float64 ScoreAllies float64 Projectile *common.GrenadeProjectile Thrower *Player ThrowerParser *common.Player PlayersFlashed []PlayerFlashed }
Flash type of a flash with all data
func (*Flash) ComputeScore ¶
func (f *Flash) ComputeScore()
ComputeScore compute the score of the flash
type Frame ¶
type Frame struct { NumFrame int BombLastPosDown r3.Vector BombPlanted bool PlayerCarrierSteamID string IGTime time.Duration Timer string Events []EventAnalyzer Players map[uint64]*PlayerEvent AddPlayersCard bool AddPositions bool Grenades []*Grenade }
Frame a frame IG
func (*Frame) GetPlayer ¶
func (f *Frame) GetPlayer(steamIDToFind uint64) *PlayerEvent
GetPlayer return the player
type Game ¶
type Game struct { FramesPerSecond int Started bool Ended bool Switched bool Players map[uint64]*Player RoundCancelled bool Rounds []*Round CurrentRound *Round NbrRounds int Teams map[int]*Team MapName string Kills []*Kill Deaths []*Death Assists []*Assist Flashs []*Flash }
Game struct of a game with all the events
func (*Game) ComputeMVPs ¶
func (g *Game) ComputeMVPs()
ComputeMVPs compute and count the number of MVPs !!! must always be call AFTER ComputeScores !!!
func (*Game) CopyHeatMaps ¶
CopyHeatMaps copy HeatMaps from analyzer to DB
func (*Game) Transcript ¶
Transcript stored data anlyzed in the demo
type Grenade ¶
type Grenade struct { ID int64 Grenade *common.GrenadeProjectile GrenadeType common.EquipmentType State GrenadeState Position r3.Vector PositionFire *[]r2.Point }
Grenade struct of grenade used for the analyzer
type GrenadeProjectileThrowEvent ¶
type GrenadeProjectileThrowEvent struct { GrenadeProjectileThrow events.GrenadeProjectileThrow TimeEvent time.Duration }
GrenadeProjectileThrowEvent event of a flashed player
func (*GrenadeProjectileThrowEvent) GetType ¶
func (gpt *GrenadeProjectileThrowEvent) GetType() EventType
GetType type of event
func (*GrenadeProjectileThrowEvent) HandleEvent ¶
func (gpt *GrenadeProjectileThrowEvent) HandleEvent(game *Game, frame Frame, round *Round) model.Event
HandleEvent return a player flashed event, addind score
type GrenadeState ¶
type GrenadeState int
GrenadeState represente the states of the grandes
const ( Nil GrenadeState = iota Destroyed Expired Stop Thrown Start Explode )
consts of the GrenadeState
type HeatMapDmg ¶
type HeatMapDmg struct { DurationSinceRoundBegan *time.Duration WeaponShooter *common.EquipmentType SteamIDShooter *string SideShooter *int ShooterPosX *float64 ShooterPosY *float64 ActiveWeaponVictim *common.EquipmentType SteamIDVictim *string SideVictim *int VictimPosX *float64 VictimPosY *float64 Dmg *int HitGroup *int }
HeatMapDmg type to store dmgs
type HeatMapKill ¶
type HeatMapKill struct { DurationSinceRoundBegan *time.Duration WeaponKiller *common.EquipmentType SteamIDKiller *string SideKiller *int KillerPosX *float64 KillerPosY *float64 ActiveWeaponVictim *common.EquipmentType SteamIDVictim *string SideVictim *int VictimPosX *float64 VictimPosY *float64 HitGroup *int }
HeatMapKill type to store kills
type ItemDropEvent ¶
type ItemDropEvent struct { }
ItemDropEvent event when an item has been dropped
func (*ItemDropEvent) HandleEvent ¶
HandleEvent return a model.Event, add score etc
type Kill ¶
type Kill struct { HeadShot bool WallBang bool Frame int TeamKill bool Victim *Player Killer *Player Assist *Player Weapon string }
Kill struct of a kill with all the data
type Mark ¶
type Mark struct { UtilityDamage int NbrDeaths int DollarStuffLost int NbrKills int CumulativeVelocityShoots int CumulativeDeltaXCrossHair float64 CumulativeDeltaYCrossHair float64 NbrShoots int NbrShootsHit int NbrShootsHS int NbrFirstBulletsFired int NbrFirstBulletsHit int NbrFirstBulletsHS int NbrDamageGave int WeaponMark map[common.EquipmentType]*WeaponMark }
Mark reflect how well a player played (not how much he has an impact)
func (*Mark) AddShoot ¶
func (m *Mark) AddShoot( weapon common.EquipmentType, velocity int, isFirstBullet bool, )
AddShoot add a shoot
func (*Mark) AddShootHit ¶
func (m *Mark) AddShootHit( isHS bool, healthDamage int, weapon common.EquipmentType, velocity int, deltaX, deltaY float64, steamIDToFind uint64, isFirstBullet bool, )
AddShootHit add a shoot hit
func (*Mark) AddStuffLost ¶
func (m *Mark) AddStuffLost(stuffValue int, weapon common.EquipmentType)
AddStuffLost add the sutff lost when dead
type MarksPerRound ¶
type MarksPerRound struct { SteamID string Side int ConstTeam int NbrBulletsFired int NbrBulletsHit int NbrBulletsHS int NbrFirstBulletsFired int NbrFirstBulletsHit int NbrFirstBulletsHS int Damage int UtilityDamage int CumulativeVelocityShoots int CumulativeDeltaXCrossHair float64 CumulativeDeltaYCrossHair float64 NbrDeaths int NbrKills int }
MarksPerRound represents the marks of a player for 1 round
func (*MarksPerRound) AddShoot ¶
func (mpr *MarksPerRound) AddShoot( weapon common.EquipmentType, velocity int, isFirstBullet bool, )
AddShoot add a shoot
func (*MarksPerRound) AddShootHit ¶
func (mpr *MarksPerRound) AddShootHit( isHS bool, healthDamage int, weapon common.EquipmentType, velocity int, deltaX, deltaY float64, isFirstBullet bool, )
AddShootHit add a shoot hit
func (*MarksPerRound) ConvertDB ¶
func (mpr *MarksPerRound) ConvertDB() *model.MarksPerRound
ConvertDB convert for the DB
type PickUpItemEvent ¶
type PickUpItemEvent struct { }
PickUpItemEvent event when an item has been pickup
func (*PickUpItemEvent) GetType ¶
func (puie *PickUpItemEvent) GetType() EventType
GetType type of event
func (*PickUpItemEvent) HandleEvent ¶
HandleEvent return a model.Event, add score etc
type Player ¶
type Player struct { Player *common.Player Team *Team SteamID uint64 Username string Rank int Color common.Color ScoreFacts ScoreFacts ScoreFactsPerRound []*ScoreFacts MVPsFacts int Mark Mark Kills []*Kill Deaths []*Death Assists []*Assist Flashs []*Flash StatsFlashs StatsFlashs WeaponPatterns []*WeaponPattern // contains filtered or unexported fields }
Player struct of a player and its kills, assits, flashes...
func (*Player) AddWeaponFirePattern ¶
func (p *Player) AddWeaponFirePattern( weaponType common.EquipmentType, frame *Frame, playrAimer *PlayerEvent, numBullet int, hit, hitHS, kill bool, playerAimed *PlayerEvent, )
AddWeaponFirePattern append the current bullet to the last pattern ot to a new one
func (*Player) ComputeFlashScore ¶
ComputeFlashScore compute the flash score of the player
func (*Player) ComputeMatrixFlashs ¶
func (p *Player) ComputeMatrixFlashs(teams map[int]*Team) []*model.MatrixFlashs
ComputeMatrixFlashs returns the MatrixFlashs of the current player
func (*Player) ComputeMatrixKills ¶
func (p *Player) ComputeMatrixKills(teams map[int]*Team) []*model.MatrixKills
ComputeMatrixKills returns the MatrixKills of the current player
func (*Player) ComputeWeaponPatterns ¶
func (p *Player) ComputeWeaponPatterns(idTest int64) []*model.WeaponPattern
ComputeWeaponPatterns compute the weapon patterns of a player
func (*Player) CountNbrEnnemiesKillAssisted ¶
CountNbrEnnemiesKillAssisted ignores team assist
func (*Player) CountNbrEnnemiesKilled ¶
CountNbrEnnemiesKilled ignores team kill
type PlayerEvent ¶
type PlayerEvent struct { SteamID uint64 EnnemiesSeen []uint64 IsAlive bool IsAirborne bool IsConnected bool IsControllingBot bool IsDefusing bool IsPlanting bool IsCrouching bool NbrShoots int Side int IsCT bool ActiveWeapon common.EquipmentType PrimaryWeapon string Pistol string Grenades []string HasC4 bool PlayerName string PlayerSteamID string Position r3.Vector Health int Armor int HasHelmet bool HasDefuseKit bool Money int EquipmentValue int ViewDirectionX float64 ViewDirectionY float64 Velocity int Ping int Recoil int AccuracyPenalty float64 }
PlayerEvent store all data of a player from the parser in order to analyze it later. can't just use the common.Event as it doesn't store all the players
func GenerateRandomPlayerEvent ¶
func GenerateRandomPlayerEvent() *PlayerEvent
GenerateRandomPlayerEvent generate a random PlayerEvent
func PlayerCommonToEvent ¶
func PlayerCommonToEvent(player *common.Player, players map[uint64]*Player, nbrRounds int) *PlayerEvent
PlayerCommonToEvent convert a commonPlayer to a playerEvent
func (*PlayerEvent) HasSeen ¶
func (p *PlayerEvent) HasSeen(steamIDEnnemy uint64) bool
HasSeen return true if p see ennemy
type PlayerFlashed ¶
PlayerFlashed player flash and the duration
type PlayerFlashedEvent ¶
type PlayerFlashedEvent struct { PlayerFlashed events.PlayerFlashed TimeEvent time.Duration }
PlayerFlashedEvent event of a flashed player
func (*PlayerFlashedEvent) GetType ¶
func (pfe *PlayerFlashedEvent) GetType() EventType
GetType type of event
func (*PlayerFlashedEvent) HandleEvent ¶
HandleEvent return a player flashed event, addind score
type PlayerHurtEvent ¶
type PlayerHurtEvent struct { PlayerHurt events.PlayerHurt TimeEvent time.Duration }
PlayerHurtEvent event of a player hurt
func (*PlayerHurtEvent) GetType ¶
func (phe *PlayerHurtEvent) GetType() EventType
GetType type of event
func (*PlayerHurtEvent) HandleEvent ¶
HandleEvent return a player hurt event, addind score
type Round ¶
type Round struct { NumRound int Frames []*Frame SideWin int ScoreFactsPerPlayer map[uint64]*ScoreFacts MarksPerRound map[uint64]*MarksPerRound Grenades map[int]*Grenade HeatMapKills []*HeatMapKill HeatMapDmgs []*HeatMapDmg ChatMessages []ChatMessage TimeBombPlanted *time.Duration TimeRoundStarted time.Duration TimeFreezeTimeEnd *time.Duration }
Round a specific round with events during the game
func (*Round) ComputeMatrixSightWithLag ¶
ComputeMatrixSightWithLag compute the matrix of a player used to calculate the distance
func (*Round) ConvertDBChatMessage ¶
func (r *Round) ConvertDBChatMessage() []*model.ChatMessage
ConvertDBChatMessage convert a list of messages for the DB
func (*Round) GetDeltasCrossHairPlacement ¶
func (r *Round) GetDeltasCrossHairPlacement(currentFrame Frame, steamIDToFind uint64) (float64, float64)
GetDeltasCrossHairPlacement return the absolute differene of angle between the current frame and the frame alst second ago
func (*Round) GetOldFrame ¶
GetOldFrame return the frame a second ago
func (*Round) IsDistancePlayersFromSightAtAMinimum ¶
func (r *Round) IsDistancePlayersFromSightAtAMinimum( frame Frame, steamIDPlayer uint64, distanceMinimum float64, ) (bool, []*PlayerEvent)
IsDistancePlayersFromSightAtAMinimum returns true if the distance is less than the minimum sent
type RoundFreezetimeEndEvent ¶
type RoundFreezetimeEndEvent struct { }
RoundFreezetimeEndEvent event when freeze time is over
func (*RoundFreezetimeEndEvent) GetType ¶
func (rfe *RoundFreezetimeEndEvent) GetType() EventType
GetType type of event
func (*RoundFreezetimeEndEvent) HandleEvent ¶
HandleEvent return a model.Event, add score etc
type ScoreFacts ¶
type ScoreFacts struct { NumRound int RatioScore float64 TotalScore float64 AttackScore AttackScore AssistsScore AssistsScore }
ScoreFacts show how much the player made an impact during the round in example, accuracy would me in a mark, not here, because the player could have a very bad accuracy, but still have a bug impact
func GenerateRandomScoreFacts ¶
func GenerateRandomScoreFacts() *ScoreFacts
GenerateRandomScoreFacts helper to generate score
func GenerateRandomScoresFactsPerRound ¶
func GenerateRandomScoresFactsPerRound(nbrRound int) []*ScoreFacts
GenerateRandomScoresFactsPerRound helper to generate score per round
func (*ScoreFacts) AddScoreFacts ¶
func (sf *ScoreFacts) AddScoreFacts(scoretoAdd ScoreFacts)
AddScoreFacts add a score this score
func (*ScoreFacts) ComputeTotalScore ¶
func (sf *ScoreFacts) ComputeTotalScore()
ComputeTotalScore calculate the total of score from everything
func (*ScoreFacts) ConvertForDB ¶
func (sf *ScoreFacts) ConvertForDB(steamID string) *model.ScoreFacts
ConvertForDB convert a analyzer.scoreFact to a model for DB
type StatsFlashs ¶
type StatsFlashs struct { Bought int Throwed int Score float64 ScoreAllies float64 ScoreEnnemies float64 }
StatsFlashs stats of a specific Player
type Team ¶
type Team struct { Players map[uint64]*Player Score int DuelsMatrix map[DuelIndex]*[]Duel NumTeam int NumTeamParser common.Team }
Team struct of team
func (*Team) GetConstTeamNum ¶
GetConstTeamNum return the side from the first round
type WeaponFireEvent ¶
type WeaponFireEvent struct { WeaponFire events.WeaponFire TimeEvent time.Duration }
WeaponFireEvent event of a fire
func (*WeaponFireEvent) GetType ¶
func (wfe *WeaponFireEvent) GetType() EventType
GetType type of event
func (*WeaponFireEvent) HandleEvent ¶
HandleEvent return a fire event
type WeaponMark ¶
type WeaponMark struct { NbrKills int NbrDeaths int NbrShoots int NbrShootsHit int NbrShootsHS int NbrFirstBulletsFired int NbrFirstBulletsHit int NbrFirstBulletsHS int NbrDamageGave int CumulativeVelocityShoots int CumulativeDeltaXCrossHair float64 CumulativeDeltaYCrossHair float64 }
WeaponMark reflect how well a player played (not how much he has an impact)
func GenerateRandomWeaponMark ¶
func GenerateRandomWeaponMark() WeaponMark
GenerateRandomWeaponMark generate a random WeaponMark
func (*WeaponMark) AddShoot ¶
func (wm *WeaponMark) AddShoot(isFirstBullet bool, velocity int)
AddShoot add a shoot
func (*WeaponMark) AddShootHit ¶
func (wm *WeaponMark) AddShootHit(isHS bool, isFirstBullet bool, velocity int, deltaX, deltaY float64)
AddShootHit add a shoot hit
func (*WeaponMark) ConvertDB ¶
func (wm *WeaponMark) ConvertDB(weaponType common.EquipmentType) *model.WeaponMarks
ConvertDB convert for the DB
type WeaponPattern ¶
type WeaponPattern struct { WeaponType common.EquipmentType BulletStats []*BulletStats }
WeaponPattern pattern of a weapon
Source Files ¶
- assit.go
- bulletStats.go
- chatMessage.go
- constScores.go
- death.go
- duels.go
- eventBombDefused.go
- eventBombExplode.go
- eventBombPlanted.go
- eventChatMessage.go
- eventGrenadeProjectileThrow.go
- eventItemDrop.go
- eventKill.go
- eventPickUpItem.go
- eventPlayerFlashed.go
- eventPlayerHurt.go
- eventRoundFreezetimeEnd.go
- eventWeaponFire.go
- events.go
- flash.go
- frame.go
- game.go
- grenade.go
- heatmap.go
- helpers_fake.go
- kill.go
- mark.go
- marksPerRound.go
- player.go
- playerEvent.go
- playerEventHelpers.go
- round.go
- scoreFact.go
- scoreFactsHelper.go
- team.go
- weaponMark.go
- weaponPattern.go