Documentation ¶
Overview ¶
Package common contains types that are used throughout this project.
Index ¶
- func MapGetAlternateVersion(mapName string) string
- func MapGetHeightThreshold(mapName string) float64
- func MapHasAlternateVersion(mapName string) bool
- type Bomb
- type Effect
- type GrenadeProjectile
- type Inferno
- type Kill
- type MapInfo
- type OverviewState
- type Phase
- type Player
- type Point
- type Shot
- type TeamState
- type Timer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MapGetAlternateVersion ¶ added in v1.0.0
MapGetAlternateVersion returns the filename for the alternate overview file.
func MapGetHeightThreshold ¶ added in v1.0.0
MapGetHeightThreshold returns the corresponding field of the specified map.
func MapHasAlternateVersion ¶ added in v1.0.0
MapHasAlternateVersion returns whether a map has an alternative overview image.
Types ¶
type Effect ¶ added in v1.0.0
type Effect struct { Position Point Type demoinfo.EquipmentType Lifetime int32 IsOnNormalElevation bool Team demoinfo.Team }
Effect contains information about graphical effects from grenades, bombs, defuses
type GrenadeProjectile ¶ added in v1.0.0
type GrenadeProjectile struct { Position Point Type demoinfo.EquipmentType IsOnNormalElevation bool }
GrenadeProjectile conains all information that is used to draw a grenade mid air on the map.
type Inferno ¶ added in v1.0.0
Inferno contains the hull points of the surface area of a molotov or incendiary grenade.
type Kill ¶ added in v0.4.0
type Kill struct { KillerName string KillerTeam demoinfo.Team VictimName string VictimTeam demoinfo.Team Weapon demoinfo.EquipmentType Headshot bool }
Kill contains all information that is displayed on the killfeed.
type MapInfo ¶ added in v1.0.0
type MapInfo struct { AlternateOverview string // Height threshold to determine if a player is on the normal or on the // alternate version of the overview map HeightThreshold float64 }
MapInfo contains information about maps in regards to alternate versions of the overview image (normal/lower/upper).
type OverviewState ¶
type OverviewState struct { IngameTick int Players []Player Grenades []GrenadeProjectile Infernos []Inferno Bomb Bomb TeamCounterTerrorists TeamState TeamTerrorists TeamState Timer Timer }
OverviewState contains all information that will be displayed for a single tick.
type Player ¶ added in v1.0.0
type Player struct { Name string ID int Team demoinfo.Team Position Point LastAlivePosition Point ViewDirectionX float32 ViewDirectionY float32 FlashDuration time.Duration FlashTimeRemaining time.Duration Inventory []demoinfo.EquipmentType ActiveWeapon demoinfo.EquipmentType Health int16 Armor int16 Money int16 Kills int16 Deaths int16 Assists int16 IsAlive bool IsDefusing bool IsOnNormalElevation bool HasHelmet bool HasDefuseKit bool HasBomb bool }
Player contains all relevant information about a player in the match.