domain

package
v0.0.0-...-37d682c Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BombPlantedType = graphql.NewObject(graphql.ObjectConfig{
	Name: "BombPlanted",
	Fields: graphql.Fields{
		"name": &graphql.Field{
			Name: "name",
			Type: graphql.String,
			Resolve: func(p graphql.ResolveParams) (interface{}, error) {
				return "BOMB_PLANTED", nil
			},
		},
		"player": &graphql.Field{
			Name: "player",
			Type: PlayerType,
			Resolve: func(p graphql.ResolveParams) (interface{}, error) {
				x := p.Source.(GameEvent)
				return x.RealEvent.(BombPlanted).Player, nil
			},
		},
		"bombsite": &graphql.Field{
			Type: graphql.Int,
			Resolve: func(p graphql.ResolveParams) (interface{}, error) {
				x := p.Source.(GameEvent)
				return x.RealEvent.(BombPlanted).Bombsite, nil
			},
		},
	},
	IsTypeOf: func(p graphql.IsTypeOfParams) bool {
		eventName := p.Value.(GameEvent).Name

		return eventName == "BOMB_PLANTED"
	},
})

BombPlantedType represents the BombPlantedEvent as GraphQL Type.

View Source
var BombType = graphql.NewObject(graphql.ObjectConfig{
	Name: "bomb",
	Fields: graphql.Fields{
		"lastOnGroundPosition": &graphql.Field{
			Type: PositionType,
		},
		"carrier": &graphql.Field{
			Type: PlayerType,
		},
	},
})

BombType is the graphql implementation for the bomb.

View Source
var EquipmentType = graphql.NewObject(graphql.ObjectConfig{
	Name: "equipment",
	Fields: graphql.Fields{
		"type": &graphql.Field{
			Type: graphql.Int,
		},
		"ammoInMagazine": &graphql.Field{
			Type: graphql.Int,
		},
		"ammoReserve": &graphql.Field{
			Type: graphql.Int,
		},
	},
})

EquipmentType represents the Equipment GraphQL Type.

View Source
var FireExpiredType = graphql.NewObject(graphql.ObjectConfig{
	Name: "FireExpired",
	Fields: graphql.Fields{
		"name": &graphql.Field{
			Name: "name",
			Type: graphql.String,
			Resolve: func(p graphql.ResolveParams) (interface{}, error) {
				return "FIRE_EXPIRED", nil
			},
		},
		"position": &graphql.Field{
			Type: PositionType,
			Resolve: func(p graphql.ResolveParams) (interface{}, error) {
				x := p.Source.(GameEvent)
				return x.RealEvent.(FireExpiredEvent).Position, nil
			},
		},
		"tick": &graphql.Field{
			Type: graphql.Int,
			Resolve: func(p graphql.ResolveParams) (interface{}, error) {
				x := p.Source.(GameEvent)
				return x.RealEvent.(FireExpiredEvent).Tick, nil
			},
		},
	},
	IsTypeOf: func(p graphql.IsTypeOfParams) bool {
		eventName := p.Value.(GameEvent).Name

		return eventName == "FIRE_EXPIRED"
	},
})

FireExpiredType is the GraphQL type of the FireStartedEvent

View Source
var FireStartedType = graphql.NewObject(graphql.ObjectConfig{
	Name: "FireStarted",
	Fields: graphql.Fields{
		"name": &graphql.Field{
			Name: "name",
			Type: graphql.String,
			Resolve: func(p graphql.ResolveParams) (interface{}, error) {
				return "FIRE_STARTED", nil
			},
		},
		"position": &graphql.Field{
			Type: PositionType,
			Resolve: func(p graphql.ResolveParams) (interface{}, error) {
				x := p.Source.(GameEvent)
				return x.RealEvent.(FireStartedEvent).Position, nil
			},
		},
		"tick": &graphql.Field{
			Type: graphql.Int,
			Resolve: func(p graphql.ResolveParams) (interface{}, error) {
				x := p.Source.(GameEvent)
				return x.RealEvent.(FireStartedEvent).Tick, nil
			},
		},
	},
	IsTypeOf: func(p graphql.IsTypeOfParams) bool {
		eventName := p.Value.(GameEvent).Name

		return eventName == "FIRE_STARTED"
	},
})

FireStartedType is the GraphQL type of the FireStartedEvent

View Source
var FlashExplosionType = graphql.NewObject(graphql.ObjectConfig{
	Name: "FlashExploded",
	Fields: graphql.Fields{
		"name": &graphql.Field{
			Name: "name",
			Type: graphql.String,
			Resolve: func(p graphql.ResolveParams) (interface{}, error) {
				return "FLASH_EXPLOSION", nil
			},
		},
		"position": &graphql.Field{
			Type: PositionType,
			Resolve: func(p graphql.ResolveParams) (interface{}, error) {
				x := p.Source.(GameEvent)
				return x.RealEvent.(FlashExplosionEvent).Position, nil
			},
		},
		"tick": &graphql.Field{
			Type: graphql.Int,
			Resolve: func(p graphql.ResolveParams) (interface{}, error) {
				x := p.Source.(GameEvent)
				return x.RealEvent.(FlashExplosionEvent).Tick, nil
			},
		},
	},
	IsTypeOf: func(p graphql.IsTypeOfParams) bool {
		eventName := p.Value.(GameEvent).Name

		return eventName == "FLASH_EXPLOSION"
	},
})
View Source
var GrenadeProjectileType = graphql.NewObject(graphql.ObjectConfig{
	Name: "Grenade",
	Fields: graphql.Fields{
		"tick": &graphql.Field{
			Type: graphql.Int,
		},
		"thrower": &graphql.Field{
			Type: PlayerType,
		},
		"owner": &graphql.Field{
			Type: PlayerType,
		},
		"position": &graphql.Field{
			Type: PositionType,
		},
		"trajectory": &graphql.Field{
			Type: graphql.NewList(PositionType),
		},
		"weapon": &graphql.Field{
			Type: EquipmentType,
		},
	},
})
View Source
var HEExplosionType = graphql.NewObject(graphql.ObjectConfig{
	Name: "HEExploded",
	Fields: graphql.Fields{
		"name": &graphql.Field{
			Name: "name",
			Type: graphql.String,
			Resolve: func(p graphql.ResolveParams) (interface{}, error) {
				return "HE_EXPLOSION", nil
			},
		},
		"position": &graphql.Field{
			Type: PositionType,
			Resolve: func(p graphql.ResolveParams) (interface{}, error) {
				x := p.Source.(GameEvent)
				return x.RealEvent.(HEExplosionEvent).Position, nil
			},
		},
		"tick": &graphql.Field{
			Type: graphql.Int,
			Resolve: func(p graphql.ResolveParams) (interface{}, error) {
				x := p.Source.(GameEvent)
				return x.RealEvent.(HEExplosionEvent).Tick, nil
			},
		},
	},
	IsTypeOf: func(p graphql.IsTypeOfParams) bool {
		eventName := p.Value.(GameEvent).Name

		return eventName == "HE_EXPLOSION"
	},
})

HEExplosionType represents the GraphQL Type of a HEGrenade.

View Source
var HeaderType = graphql.NewObject(graphql.ObjectConfig{
	Name: "Header",
	Fields: graphql.Fields{
		"mapName": &graphql.Field{
			Type: graphql.String,
		},
		"tickRate": &graphql.Field{
			Type: graphql.Int,
		},
		"fps": &graphql.Field{
			Type: graphql.Int,
		},
	},
})
View Source
var InfernoType = graphql.NewObject(graphql.ObjectConfig{
	Name: "Inferno",
	Fields: graphql.Fields{
		"hull": &graphql.Field{
			Type: graphql.NewList(PositionType),
		},
	},
})

InfernoType represents the GraphQL Type of an inferno.

View Source
var MatchStartedEventTpe = graphql.NewObject(graphql.ObjectConfig{
	Name: "MatchStarted",
	Fields: graphql.Fields{
		"name": &graphql.Field{
			Name: "name",
			Type: graphql.String,
			Resolve: func(p graphql.ResolveParams) (interface{}, error) {
				return "MATCH_STARTED", nil
			},
		},
		"tick": &graphql.Field{
			Type: graphql.Int,
			Resolve: func(p graphql.ResolveParams) (interface{}, error) {
				x := p.Source.(GameEvent)
				return x.RealEvent.(MatchStartedEvent).Tick, nil
			},
		},
	},
	IsTypeOf: func(p graphql.IsTypeOfParams) bool {
		eventName := p.Value.(GameEvent).Name

		return eventName == "MATCH_STARTED"
	},
})
View Source
var PlayerType = graphql.NewObject(graphql.ObjectConfig{
	Name: "Player",
	Fields: graphql.Fields{
		"name": &graphql.Field{
			Type: graphql.String,
		},
		"entityId": &graphql.Field{
			Type: graphql.Int,
		},
		"team": &graphql.Field{
			Type: graphql.Int,
		},
		"position": &graphql.Field{
			Type: PositionType,
		},
		"angleX": &graphql.Field{
			Type: graphql.Float,
		},
		"angleY": &graphql.Field{
			Type: graphql.Float,
		},
		"hp": &graphql.Field{
			Type: graphql.Int,
		},
		"armor": &graphql.Field{
			Type: graphql.Int,
		},
		"flashDuration": &graphql.Field{
			Type: graphql.Float,
		},
		"npc": &graphql.Field{
			Type: graphql.Boolean,
		},
		"hasHelmet": &graphql.Field{
			Type: graphql.Boolean,
		},
		"hasDefuseKit": &graphql.Field{
			Type: graphql.Boolean,
		},
		"equipment": &graphql.Field{
			Type: graphql.NewList(EquipmentType),
		},
		"planting": &graphql.Field{
			Type: graphql.Boolean,
		},
		"defusing": &graphql.Field{
			Type: graphql.Boolean,
		},
		"inBuyzone": &graphql.Field{
			Type: graphql.Boolean,
		},
		"firing": &graphql.Field{
			Type: graphql.Boolean,
		},
		"money": &graphql.Field{
			Type: graphql.Int,
		},
		"kills": &graphql.Field{
			Type: graphql.Int,
		},
		"deaths": &graphql.Field{
			Type: graphql.Int,
		},
	},
})
View Source
var PositionType = graphql.NewObject(graphql.ObjectConfig{
	Name: "Position",
	Fields: graphql.Fields{
		"x": &graphql.Field{
			Type: graphql.Float,
		},
		"y": &graphql.Field{
			Type: graphql.Float,
		},
		"z": &graphql.Field{
			Type: graphql.Float,
		},
	},
})
View Source
var RoundEndedType = graphql.NewObject(graphql.ObjectConfig{
	Name: "RoundEnded",
	Fields: graphql.Fields{
		"name": &graphql.Field{
			Name: "name",
			Type: graphql.String,
			Resolve: func(p graphql.ResolveParams) (interface{}, error) {
				return "ROUND_ENDED", nil
			},
		},
		"tick": &graphql.Field{
			Type: graphql.Int,
			Resolve: func(p graphql.ResolveParams) (interface{}, error) {
				x := p.Source.(GameEvent)
				return x.RealEvent.(RoundEndEvent).Tick, nil
			},
		},
	},
	IsTypeOf: func(p graphql.IsTypeOfParams) bool {
		eventName := p.Value.(GameEvent).Name

		return eventName == "ROUND_ENDED"
	},
})
View Source
var RoundStartedType = graphql.NewObject(graphql.ObjectConfig{
	Name: "RoundStarted",
	Fields: graphql.Fields{
		"name": &graphql.Field{
			Name: "name",
			Type: graphql.String,
			Resolve: func(p graphql.ResolveParams) (interface{}, error) {
				return "ROUND_STARTED", nil
			},
		},
		"tick": &graphql.Field{
			Type: graphql.Int,
			Resolve: func(p graphql.ResolveParams) (interface{}, error) {
				x := p.Source.(GameEvent)
				return x.RealEvent.(RoundStartedEvent).Tick, nil
			},
		},
		"timeLimit": &graphql.Field{
			Type: graphql.Int,
			Resolve: func(p graphql.ResolveParams) (interface{}, error) {
				x := p.Source.(GameEvent)
				return x.RealEvent.(RoundStartedEvent).TimeLimit, nil
			},
		},
		"objective": &graphql.Field{
			Type: graphql.String,
			Resolve: func(p graphql.ResolveParams) (interface{}, error) {
				x := p.Source.(GameEvent)
				return x.RealEvent.(RoundStartedEvent).Objective, nil
			},
		},
		"fragLimit": &graphql.Field{
			Type: graphql.Int,
			Resolve: func(p graphql.ResolveParams) (interface{}, error) {
				x := p.Source.(GameEvent)
				return x.RealEvent.(RoundStartedEvent).FragLimit, nil
			},
		},
	},
	IsTypeOf: func(p graphql.IsTypeOfParams) bool {
		eventName := p.Value.(GameEvent).Name

		return eventName == "ROUND_STARTED"
	},
})
View Source
var SmokeExpiredType = graphql.NewObject(graphql.ObjectConfig{
	Name: "SmokeExpired",
	Fields: graphql.Fields{
		"name": &graphql.Field{
			Name: "name",
			Type: graphql.String,
			Resolve: func(p graphql.ResolveParams) (interface{}, error) {
				return "SMOKE_EXPIRED", nil
			},
		},
		"position": &graphql.Field{
			Type: PositionType,
			Resolve: func(p graphql.ResolveParams) (interface{}, error) {
				x := p.Source.(GameEvent)
				return x.RealEvent.(SmokeExpiredEvent).Position, nil
			},
		},
		"tick": &graphql.Field{
			Type: graphql.Int,
			Resolve: func(p graphql.ResolveParams) (interface{}, error) {
				x := p.Source.(GameEvent)
				return x.RealEvent.(SmokeExpiredEvent).Tick, nil
			},
		},
	},
	IsTypeOf: func(p graphql.IsTypeOfParams) bool {
		eventName := p.Value.(GameEvent).Name

		return eventName == "SMOKE_EXPIRED"
	},
})
View Source
var SmokeStartedType = graphql.NewObject(graphql.ObjectConfig{
	Name: "SmokeStarted",
	Fields: graphql.Fields{
		"name": &graphql.Field{
			Name: "name",
			Type: graphql.String,
			Resolve: func(p graphql.ResolveParams) (interface{}, error) {
				return "SMOKE_STARTED", nil
			},
		},
		"position": &graphql.Field{
			Type: PositionType,
			Resolve: func(p graphql.ResolveParams) (interface{}, error) {
				x := p.Source.(GameEvent)
				return x.RealEvent.(SmokeStartedEvent).Position, nil
			},
		},
		"tick": &graphql.Field{
			Type: graphql.Int,
			Resolve: func(p graphql.ResolveParams) (interface{}, error) {
				x := p.Source.(GameEvent)
				return x.RealEvent.(SmokeStartedEvent).Tick, nil
			},
		},
	},
	IsTypeOf: func(p graphql.IsTypeOfParams) bool {
		eventName := p.Value.(GameEvent).Name

		return eventName == "SMOKE_STARTED"
	},
})
View Source
var SmokeType = graphql.NewObject(graphql.ObjectConfig{
	Name: "smoke",
	Fields: graphql.Fields{
		"position": &graphql.Field{
			Type: PositionType,
		},
		"id": &graphql.Field{
			Type: graphql.Int,
		},
	},
})

SmokeType represents the GraphQL Type of a Smoke

View Source
var TickType = graphql.NewObject(graphql.ObjectConfig{
	Name: "Tick",
	Fields: graphql.Fields{
		"tick": &graphql.Field{
			Type: graphql.Int,
		},
		"players": &graphql.Field{
			Type: graphql.NewList(PlayerType),
		},
		"bomb": &graphql.Field{
			Type: BombType,
		},
		"grenades": &graphql.Field{
			Type: graphql.NewList(GrenadeProjectileType),
		},
		"infernos": &graphql.Field{
			Type: graphql.NewList(InfernoType),
		},
		"smokes": &graphql.Field{
			Type: graphql.NewList(SmokeType),
		},
		"totalRoundsPlayed": &graphql.Field{
			Type: graphql.Int,
		},
	},
})
View Source
var WeaponFiredType = graphql.NewObject(graphql.ObjectConfig{
	Name: "WeaponFired",
	Fields: graphql.Fields{
		"name": &graphql.Field{
			Name: "name",
			Type: graphql.String,
			Resolve: func(p graphql.ResolveParams) (interface{}, error) {
				return "WEAPON_FIRED", nil
			},
		},
		"shooter": &graphql.Field{
			Name: "shooter",
			Type: PlayerType,
			Resolve: func(p graphql.ResolveParams) (interface{}, error) {
				x := p.Source.(GameEvent)
				event := x.RealEvent.(WeaponFired)
				return event.Shooter, nil
			},
		},
		"weapon": &graphql.Field{
			Name: "weapon",
			Type: EquipmentType,
			Resolve: func(p graphql.ResolveParams) (interface{}, error) {
				x := p.Source.(GameEvent)
				event := x.RealEvent.(WeaponFired)
				return event.Weapon, nil
			},
		},
		"tick": &graphql.Field{
			Name: "tick",
			Type: graphql.Int,
			Resolve: func(p graphql.ResolveParams) (interface{}, error) {
				x := p.Source.(GameEvent)
				event := x.RealEvent.(WeaponFired)
				return event.Tick, nil
			},
		},
	},
	IsTypeOf: func(p graphql.IsTypeOfParams) bool {
		eventName := p.Value.(GameEvent).Name

		return eventName == "WEAPON_FIRED"
	},
})

Functions

func CreateDemoType

func CreateDemoType(repository *DemoRepository) *graphql.Object

CreateDemoType creats a GraphQL Schema representing the whole query.

Types

type Bomb

type Bomb struct {
	LastOnGroundPosition Position `json:"lastOnGroundPosition"`
	Carrier              Player   `json:"carrier"`
}

Bomb is the structure representing the json of the bombstate in a tick.

type BombPlanted

type BombPlanted struct {
	Name     string `json:"name"`
	Player   Player `json:"player"`
	Bombsite int32  `json:"bombsite"`
}

BombPlanted represents the event, when the bomb was planted.

type Demo

type Demo struct {
	Header Header      `json:"header"`
	Ticks  []Tick      `json:"ticks"`
	Events []GameEvent `json:"events"`
}

Demo represents the json of a whole demo.

func RecordDemo

func RecordDemo(file io.Reader, freq float64) Demo

RecordDemo models the process of replaying the demo while recording all events.

type DemoRepository

type DemoRepository struct {
	CurrentDemo Demo
}

DemoRepository holds the state of the whole Operation. In this case a simple in memory database

type Equipment

type Equipment struct {
	Type           int `json:"type"`
	AmmoInMagazine int `json:"ammoInMagazine"`
	AmmoReserve    int `json:"ammoReserve"`
	AmmoType       int `json:"ammoType"`
}

Equipment represents the Equipment of a player in the json format.

func FromEquipment

func FromEquipment(eq *common.Equipment) Equipment

FromEquipment maps a single "core" Equipment to the JSON Model.

func ToEntityEquipment

func ToEntityEquipment(eq []*common.Equipment) []Equipment

ToEntityEquipment maps an array of "core" Equipment to the JSON Model.

type FireExpiredEvent

type FireExpiredEvent struct {
	Position Position `json:"position"`
	Name     string   `json:"name"`
	Tick     int      `json:"tick"`
}

FireExpiredEvent represents the JSON of the fire expired event.

type FireStartedEvent

type FireStartedEvent struct {
	Position Position `json:"position"`
	Name     string   `json:"name"`
	Tick     int      `json:"tick"`
}

FireStartedEvent represents the JSON of the fire started event.

type FlashExplosionEvent

type FlashExplosionEvent struct {
	Position Position `json:"position"`
	Name     string   `json:"name"`
	Tick     int      `json:"tick"`
}

type GameEvent

type GameEvent struct {
	Name      string `json:"name"`
	RealEvent interface{}
}

func FireExpired

func FireExpired(tick int, e events.FireGrenadeExpired) GameEvent

FireExpired creates a GameEvent for FIRE_EXPIRED of the real Event.

func FireStarted

func FireStarted(tick int, e events.FireGrenadeStart) GameEvent

FireStarted creates a GameEvent for FIRE_STARTED of the real Event.

func NewFlashExplosion

func NewFlashExplosion(tick int, e events.FlashExplode) GameEvent

func NewHeExplosion

func NewHeExplosion(tick int, e events.HeExplode) GameEvent

NewHeExplision creates a new HEExplosion Event from the core event.

func NewMatchStartedEvent

func NewMatchStartedEvent(t int, e events.MatchStart) GameEvent

func RoundEnded

func RoundEnded(tick int, e events.RoundEnd) GameEvent

func RoundStarted

func RoundStarted(tick int, e events.RoundStart) GameEvent

func SmokeExpired

func SmokeExpired(tick int, e events.SmokeExpired) GameEvent

func SmokeStarted

func SmokeStarted(tick int, e events.SmokeStart) GameEvent

type Grenade

type Grenade struct {
	Thrower        Player     `json:"thrower"`
	Owner          Player     `json:"owner"`
	Trajectory     []Position `json:"trajectory"`
	WeaponInstance Equipment  `json:"weapon"`
	Position       Position   `json:"position"`
	UniqueId       int64      `json:"uniqueId"`
}

func NewProjectile

func NewProjectile(e common.GrenadeProjectile, firing map[int]bool) Grenade

type HEExplosionEvent

type HEExplosionEvent struct {
	Position Position `json:"position"`
	Name     string   `json:"name"`
	Tick     int      `json:"tick"`
}

HEExplosionEvent represents an event of a explodion HE-Grenade.

type Header struct {
	MapName  string  `json:"map"`
	TickRate float64 `json:"tickRate"` // How many ticks per second
	Fps      int     `json:"fps"`
}

type Inferno

type Inferno struct {
	Hull []Position `json:"hull"`
}

Inferno represents a burning fire.

func ToInferno

func ToInferno(inferno common.Inferno) Inferno

type MatchStartedEvent

type MatchStartedEvent struct {
	Name string `json:"name"`
	Tick int    `json:"tick"`
}

type Player

type Player struct {
	Name          string      `json:"name"`
	EntityID      int         `json:"entityId"`
	Team          int         `json:"team,omitempty"`
	Position      Position    `json:"position,omitempty"` // This allows us smoother replay with less overhead compared to higher snapshot rate
	AngleX        int         `json:"angleX,omitempty"`
	AngleY        int         `json:"angleY,omitempty"`
	Hp            int         `json:"hp,omitempty"`
	Armor         int         `json:"armor,omitempty"`
	FlashDuration float32     `json:"flashDuration,omitempty"`
	Npc           bool        `json:"npc,omitempty"`
	HasHelmet     bool        `json:"hasHelmet,omitempty"`
	HasDefuseKit  bool        `json:"hasDefuseKit,omitempty"`
	Equipment     []Equipment `json:"equipment,omitempty"`
	Planting      bool        `json:"planting,omitempty"`
	Defusing      bool        `json:"defusing,omitempty"`
	InBuyzone     bool        `json:"inBuyzone,omitempty"`
	Money         int         `json:"money,omitempty"`
	Kills         int         `json:"kills,omitempty"`
	Deaths        int         `json:"deaths,omitempty"`
	Firing        bool        `json:"isFiring, omitempty"`
}

func CreateParticipant

func CreateParticipant(pl *common.Player, fireing bool) Player

type Position

type Position struct {
	X float64 `json:"x"`
	Y float64 `json:"y"`
	Z float64 `json:"z"`
}

func FromPoint

func FromPoint(e r2.Point) Position

FromPoints creats a position array from a point array.

func FromPoints

func FromPoints(e []r2.Point) []Position

FromPoints creats a position array from a point array.

func FromVector

func FromVector(e r3.Vector) Position

func FromVectors

func FromVectors(e []r3.Vector) []Position

type RoundEndEvent

type RoundEndEvent struct {
	Name string `json:"name"`
	Tick int    `json:"tick"`
}

type RoundStartedEvent

type RoundStartedEvent struct {
	Name      string `json:"name"`
	Tick      int    `json:"tick"`
	FragLimit int    `json:"fragLimit"`
	Objective string `json:"objective"`
	TimeLimit int    `json:"timeLimit"`
}

type Smoke

type Smoke struct {
	Id       int      `json:"id"`
	Position Position `json:"position"`
}

Smoke represents an active smoke in the world.

func Remove

func Remove(smokes []Smoke, toRemove int) []Smoke

Remove removes a Smoke Id from smokes

type SmokeExpiredEvent

type SmokeExpiredEvent struct {
	Position Position `json:"position"`
	Name     string   `json:"name"`
	Tick     int      `json:"tick"`
}

type SmokeStartedEvent

type SmokeStartedEvent struct {
	Position Position `json:"position"`
	Name     string   `json:"name"`
	Tick     int      `json:"tick"`
}

type Tick

type Tick struct {
	Tick              int       `json:"tick"`
	Players           []Player  `json:"players"`
	Grenades          []Grenade `json:"grenades"`
	Infernos          []Inferno `json:"infernos"`
	Smokes            []Smoke   `json:"smokes"`
	Bomb              Bomb      `json:"bomb"`
	TotalRoundsPlayed int       `json:"totalRoundsPlayed"`
}

type WeaponFired

type WeaponFired struct {
	Name    string    `json:"name"`
	Shooter Player    `json:"shooter"`
	Weapon  Equipment `json:"weapon"`
	Tick    int       `json:"tick"`
}

Jump to

Keyboard shortcuts

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