Documentation ¶
Index ¶
- type Entity
- func (e *Entity) ApplyUpdate(reader *bit.BitReader)
- func (e *Entity) BindProperty(prop string, variable any, t st.PropertyValueType)
- func (e *Entity) Destroy()
- func (e *Entity) Exists(name string) bool
- func (e *Entity) Get(name string) interface{}
- func (e *Entity) GetBool(name string) (bool, bool)
- func (e *Entity) GetClassId() int32
- func (e *Entity) GetClassName() string
- func (e *Entity) GetFloat32(name string) (float32, bool)
- func (e *Entity) GetIndex() int32
- func (e *Entity) GetInt32(name string) (int32, bool)
- func (e *Entity) GetSerial() int32
- func (e *Entity) GetString(name string) (string, bool)
- func (e *Entity) GetUint32(name string) (uint32, bool)
- func (e *Entity) GetUint64(name string) (uint64, bool)
- func (e *Entity) ID() int
- func (e *Entity) Map() map[string]interface{}
- func (e *Entity) OnCreateFinished(delegate func())
- func (e *Entity) OnDestroy(delegate func())
- func (e *Entity) OnPositionUpdate(h func(pos r3.Vector))
- func (e *Entity) Position() r3.Vector
- func (e *Entity) Properties() (out []st.Property)
- func (e *Entity) Property(name string) st.Property
- func (e *Entity) PropertyValue(name string) (st.PropertyValue, bool)
- func (e *Entity) PropertyValueMust(name string) st.PropertyValue
- func (e *Entity) SerialNum() int
- func (e *Entity) ServerClass() st.ServerClass
- func (e *Entity) String() string
- type Parser
- func (p *Parser) FilterEntity(fb func(*Entity) bool) []*Entity
- func (p *Parser) FindEntity(index int32) *Entity
- func (p *Parser) FindEntityByHandle(handle uint64) *Entity
- func (p *Parser) OnDemoClassInfo(m *msgs2.CDemoClassInfo) error
- func (p *Parser) OnEntity(h st.EntityHandler)
- func (p *Parser) OnPacketEntities(m *msgs2.CSVCMsg_PacketEntities) error
- func (p *Parser) OnServerInfo(m *msgs2.CSVCMsg_ServerInfo) error
- func (p *Parser) ParsePacket(b []byte) error
- func (p *Parser) ReadEnterPVS(r *bit.BitReader, index int, entities map[int]st.Entity, slot int) st.Entity
- func (p *Parser) ServerClasses() st.ServerClasses
- func (p *Parser) SetInstanceBaseline(scID int, data []byte)
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 (*Entity) BindProperty ¶
func (e *Entity) BindProperty(prop string, variable any, t st.PropertyValueType)
func (*Entity) GetClassId ¶
GetClassId returns the id of the class associated with this Entity
func (*Entity) GetClassName ¶
GetClassName returns the name of the class associated with this Entity
func (*Entity) GetFloat32 ¶
GetFloat32 gets given key as an float32
func (*Entity) OnCreateFinished ¶
func (e *Entity) OnCreateFinished(delegate func())
func (*Entity) OnPositionUpdate ¶
func (*Entity) Properties ¶
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) ServerClass ¶
func (e *Entity) ServerClass() st.ServerClass
type Parser ¶
type Parser struct {
// contains filtered or unexported fields
}
func (*Parser) FilterEntity ¶
FilterEntity finds entities by callback
func (*Parser) FindEntity ¶
FindEntity finds a given Entity by index
func (*Parser) FindEntityByHandle ¶
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 (*Parser) ReadEnterPVS ¶
func (*Parser) ServerClasses ¶
func (p *Parser) ServerClasses() st.ServerClasses
func (*Parser) SetInstanceBaseline ¶
SetInstanceBaseline sets the raw instance-baseline data for a serverclass by ID.
Intended for internal use only.