demoparser

package
v0.0.0-...-ad7cd34 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 6, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetPlayerBestWeapon

func GetPlayerBestWeapon(weaponsKills map[string]int) string

func GetPlayersName

func GetPlayersName(players map[uint64]*DemoPlayer) []string

func GetPlayersToAnalyse

func GetPlayersToAnalyse(players map[uint64]*DemoPlayer, playersToAnalyse []string) map[uint64]*DemoPlayer

Types

type AssistStats

type AssistStats struct {
	Total          int `json:"total"`
	FlashedEnemies int `json:"flashed_enemies"`
	DamageGiven    int `json:"damage_given"`
}

type DemoPlayer

type DemoPlayer struct {
	SteamID        uint64         `json:"steam_id"`
	Name           string         `json:"name"`
	UserID         int            `json:"user_id"`
	Deaths         int            `json:"deaths"`
	KillStats      KillStats      `json:"kill_stats"`
	AssistStats    AssistStats    `json:"assist_stats"`
	PlayerMapStats PlayerMapStats `json:"player_map_stats"`
	RoundData      []RoundData    `json:"round_data"`
}

func (DemoPlayer) String

func (p DemoPlayer) String() string

type KillStats

type KillStats struct {
	Total        int            `json:"total"`
	HeadShots    int            `json:"headshots"`
	Precision    float64        `json:"precision"`
	WeaponsKills map[string]int `json:"weapons_kills"`
	TradeKills   int            `json:"trade_kills"`
}

type MapData

type MapData struct {
	MapName     string `json:"map_name"`
	TotalRounds int    `json:"total_rounds"`
	RoundsWonCT int    `json:"rounds_won_ct"`
	RoundsWonT  int    `json:"rounds_won_t"`
}

type PlayerMapStats

type PlayerMapStats struct {
	MVPs        int `json:"mvps"`
	ACEs        int `json:"aces"`
	ClutchesWon int `json:"clutches_won"`
}

type ProcessedDemo

type ProcessedDemo struct {
	Players  map[uint64]*DemoPlayer `json:"players"`
	Map      MapData                `json:"map_data"`
	GameMode string                 `json:"game_mode"`
}

func ProcessDemo

func ProcessDemo(demoPath string) *ProcessedDemo

type RoundData

type RoundData struct {
	RoundNumber       int
	KillsByPlayer     map[uint64]int // Key: Player's SteamID64, Value: Number of kills in the round
	PlayersAliveCT    int
	PlayersAliveT     int
	WinningTeam       common.Team
	ClutchWonByPlayer uint64 // SteamID of the player who won the clutch, if any
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL