sendtables2

package
v4.0.1-cs2lens-crash-f... Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Entity

type Entity struct {
	// contains filtered or unexported fields
}

Entity represents a single game entity in the replay

func (*Entity) ApplyUpdate

func (e *Entity) ApplyUpdate(reader *bit.BitReader)

func (*Entity) BindProperty

func (e *Entity) BindProperty(prop string, variable any, t st.PropertyValueType)

func (*Entity) Destroy

func (e *Entity) Destroy()

func (*Entity) Exists

func (e *Entity) Exists(name string) bool

Exists returns true if the given key exists in the Entity state

func (*Entity) Get

func (e *Entity) Get(name string) interface{}

Get returns the current value of the Entity state for the given key

func (*Entity) GetBool

func (e *Entity) GetBool(name string) (bool, bool)

GetBool gets given key as a bool

func (*Entity) GetClassId

func (e *Entity) GetClassId() int32

GetClassId returns the id of the class associated with this Entity

func (*Entity) GetClassName

func (e *Entity) GetClassName() string

GetClassName returns the name of the class associated with this Entity

func (*Entity) GetFloat32

func (e *Entity) GetFloat32(name string) (float32, bool)

GetFloat32 gets given key as an float32

func (*Entity) GetIndex

func (e *Entity) GetIndex() int32

GetIndex returns the index of this Entity

func (*Entity) GetInt32

func (e *Entity) GetInt32(name string) (int32, bool)

GetInt32 gets given key as an int32

func (*Entity) GetSerial

func (e *Entity) GetSerial() int32

GetSerial return the serial of the class associated with this Entity

func (*Entity) GetString

func (e *Entity) GetString(name string) (string, bool)

GetString gets given key as a string

func (*Entity) GetUint32

func (e *Entity) GetUint32(name string) (uint32, bool)

GetUint32 gets given key as a uint32

func (*Entity) GetUint64

func (e *Entity) GetUint64(name string) (uint64, bool)

GetUint64 gets given key as a uint64

func (*Entity) ID

func (e *Entity) ID() int

func (*Entity) Map

func (e *Entity) Map() map[string]interface{}

Map returns a map of current entity state as key-value pairs

func (*Entity) OnCreateFinished

func (e *Entity) OnCreateFinished(delegate func())

func (*Entity) OnDestroy

func (e *Entity) OnDestroy(delegate func())

func (*Entity) OnPositionUpdate

func (e *Entity) OnPositionUpdate(h func(pos r3.Vector))

func (*Entity) Position

func (e *Entity) Position() r3.Vector

func (*Entity) Properties

func (e *Entity) Properties() (out []st.Property)

func (*Entity) Property

func (e *Entity) Property(name string) st.Property

func (*Entity) PropertyValue

func (e *Entity) PropertyValue(name string) (st.PropertyValue, bool)

func (*Entity) PropertyValueMust

func (e *Entity) PropertyValueMust(name string) st.PropertyValue

func (*Entity) SerialNum

func (e *Entity) SerialNum() int

func (*Entity) ServerClass

func (e *Entity) ServerClass() st.ServerClass

func (*Entity) String

func (e *Entity) String() string

String returns a human identifiable string for the Entity

type Parser

type Parser struct {
	// contains filtered or unexported fields
}

func NewParser

func NewParser() *Parser

func (*Parser) FilterEntity

func (p *Parser) FilterEntity(fb func(*Entity) bool) []*Entity

FilterEntity finds entities by callback

func (*Parser) FindEntity

func (p *Parser) FindEntity(index int32) *Entity

FindEntity finds a given Entity by index

func (*Parser) FindEntityByHandle

func (p *Parser) FindEntityByHandle(handle uint64) *Entity

FindEntityByHandle finds a given Entity by handle

func (*Parser) OnDemoClassInfo

func (p *Parser) OnDemoClassInfo(m *msgs2.CDemoClassInfo) error

func (*Parser) OnEntity

func (p *Parser) OnEntity(h st.EntityHandler)

OnEntity registers an EntityHandler that will be called when an entity is created, updated, deleted, etc.

func (*Parser) OnPacketEntities

func (p *Parser) OnPacketEntities(m *msgs2.CSVCMsg_PacketEntities) error

Internal Callback for OnCSVCMsg_PacketEntities.

func (*Parser) OnServerInfo

func (p *Parser) OnServerInfo(m *msgs2.CSVCMsg_ServerInfo) error

Internal callback for OnCSVCMsg_ServerInfo.

func (*Parser) ParsePacket

func (p *Parser) ParsePacket(b []byte) error

func (*Parser) ReadEnterPVS

func (p *Parser) ReadEnterPVS(r *bit.BitReader, index int, entities map[int]st.Entity, slot int) st.Entity

func (*Parser) ServerClasses

func (p *Parser) ServerClasses() st.ServerClasses

func (*Parser) SetInstanceBaseline

func (p *Parser) SetInstanceBaseline(scID int, data []byte)

SetInstanceBaseline sets the raw instance-baseline data for a serverclass by ID.

Intended for internal use only.

Jump to

Keyboard shortcuts

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