Documentation ¶
Index ¶
- type CLC_BaselineAck
- type CLC_ClientInfo
- type CLC_CmdKeyValues
- type CLC_FileCRCCheck
- type CLC_ListenEvents
- type CLC_LoadingProgress
- type CLC_Move
- type CLC_RespondCvarValue
- type CLC_SplitPlayerConnect
- type CLC_VoiceData
- type KeyValuePair
- type NET_Disconnect
- type NET_File
- type NET_NOP
- type NET_SetConVar
- type NET_SignonState
- type NET_SplitScreenUser
- type NET_StringCmd
- type NET_Tick
- type Packet
- type SVC_BSPDecal
- type SVC_ClassInfo
- type SVC_CmdKeyValues
- type SVC_CreateStringTable
- type SVC_CrosshairAngle
- type SVC_EntityMessage
- type SVC_FixAngle
- type SVC_GameEvent
- type SVC_GameEventList
- type SVC_GetCvarValue
- type SVC_Menu
- type SVC_PacketEntities
- type SVC_Prefetch
- type SVC_Print
- type SVC_SendTable
- type SVC_ServerInfo
- type SVC_SetPause
- type SVC_SetView
- type SVC_Sounds
- type SVC_SplitScreen
- type SVC_TempEntities
- type SVC_UpdateStringTable
- type SVC_UserMessage
- type SVC_VoiceData
- type SVC_VoiceInit
- type SendProp
- type SendPropFlags
- type SendPropType
- type SendTable
- type SendTables
- type ServerClassInfo
- type ServerClasses
- type SignonState
- type StringTable
- type StringTableEntry
- type StringTables
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CLC_BaselineAck ¶
type CLC_BaselineAck struct { Tick uint32 Baseline bool // alternates every time the baseline changes }
func (*CLC_BaselineAck) PacketType ¶
func (p *CLC_BaselineAck) PacketType() int
type CLC_ClientInfo ¶
type CLC_ClientInfo struct { ServerCount uint32 SendTableCRC uint32 IsHLTV bool AccountID uint32 Name string CustomFileCRC [4]*uint32 }
func (*CLC_ClientInfo) PacketType ¶
func (p *CLC_ClientInfo) PacketType() int
type CLC_CmdKeyValues ¶
func (*CLC_CmdKeyValues) PacketType ¶
func (p *CLC_CmdKeyValues) PacketType() int
type CLC_FileCRCCheck ¶
type CLC_FileCRCCheck struct { // reserved bit (0) // 2 bits (0 or 1+index into commonPaths) // if 0, string Path string // 3 bits (0 or 1+index into commonFilenamePrefixes) // if non-zero, implied slash // string FileName string CRC32 uint32 }
func (*CLC_FileCRCCheck) PacketType ¶
func (p *CLC_FileCRCCheck) PacketType() int
type CLC_ListenEvents ¶
type CLC_ListenEvents struct {
Flags [(1 << 9) / 32]uint32
}
func (*CLC_ListenEvents) PacketType ¶
func (p *CLC_ListenEvents) PacketType() int
type CLC_LoadingProgress ¶
type CLC_LoadingProgress struct {
Progress uint8
}
func (*CLC_LoadingProgress) PacketType ¶
func (p *CLC_LoadingProgress) PacketType() int
type CLC_Move ¶
type CLC_Move struct { NewCommands uint8 // 4 bits BackupCommands uint8 // 3 bits BitLength uint16 UserCmdData []byte }
func (*CLC_Move) PacketType ¶
type CLC_RespondCvarValue ¶
type CLC_RespondCvarValue struct { Cookie int32 StatusCode int8 // 4 bits CVar KeyValuePair }
func (*CLC_RespondCvarValue) PacketType ¶
func (p *CLC_RespondCvarValue) PacketType() int
type CLC_SplitPlayerConnect ¶
type CLC_SplitPlayerConnect struct {
ConVars NET_SetConVar
}
func (*CLC_SplitPlayerConnect) PacketType ¶
func (p *CLC_SplitPlayerConnect) PacketType() int
type CLC_VoiceData ¶
func (*CLC_VoiceData) PacketType ¶
func (p *CLC_VoiceData) PacketType() int
type KeyValuePair ¶
type KeyValuePair struct {
Key, Value string
}
type NET_Disconnect ¶
type NET_Disconnect struct {
Reason string
}
func (*NET_Disconnect) PacketType ¶
func (p *NET_Disconnect) PacketType() int
type NET_File ¶
type NET_File struct { TransferID uint32 Name string IsRequest bool // if it's not a request, this is a rejection }
func (*NET_File) PacketType ¶
type NET_SetConVar ¶
type NET_SetConVar struct { // uint8 count followed by strings ConVars []KeyValuePair }
func (*NET_SetConVar) PacketType ¶
func (p *NET_SetConVar) PacketType() int
type NET_SignonState ¶
type NET_SignonState struct { State SignonState SpawnCount uint32 }
func (*NET_SignonState) PacketType ¶
func (p *NET_SignonState) PacketType() int
type NET_SplitScreenUser ¶
type NET_SplitScreenUser struct {
Slot uint8 // 2 bits
}
func (*NET_SplitScreenUser) PacketType ¶
func (p *NET_SplitScreenUser) PacketType() int
type NET_StringCmd ¶
type NET_StringCmd struct {
Command string
}
func (*NET_StringCmd) PacketType ¶
func (p *NET_StringCmd) PacketType() int
type NET_Tick ¶
type NET_Tick struct { TickNumber int32 // 0.5 fixed point seconds (that is, max value is 655.35 milliseconds) FrameTime uint16 FrameTimeStdDev uint16 }
func (*NET_Tick) PacketType ¶
type SVC_BSPDecal ¶
type SVC_BSPDecal struct { Position [3]float32 // BitVec3Coord DecalTextureIndex uint16 // 9 bits // if these are both 0, write a 0 bit and skip them. // otherwise, write a 1 bit and then the next two fields. EntityIndex uint16 // 11 bits ModelIndex uint16 // 11 bits LowPriority bool }
func (*SVC_BSPDecal) PacketType ¶
func (p *SVC_BSPDecal) PacketType() int
type SVC_ClassInfo ¶
type SVC_ClassInfo struct { NumClasses uint16 CreateOnClient bool Info []ServerClassInfo }
func (*SVC_ClassInfo) PacketType ¶
func (p *SVC_ClassInfo) PacketType() int
type SVC_CmdKeyValues ¶
func (*SVC_CmdKeyValues) PacketType ¶
func (p *SVC_CmdKeyValues) PacketType() int
type SVC_CreateStringTable ¶
type SVC_CreateStringTable struct { TableName string MaxEntries uint16 // number of bits is smallest number of bits needed to hold MaxEntries+1 NumEntries uint16 BitLength uint32 // 20 bits UserDataFixedSize bool UserDataSizeBytes uint16 // 12 bits (only if UserDataFixedSize) UserDataSizeBits uint16 // 4 bits (only if UserDataFixedSize) DataCompressed bool IsFilenames bool Data []byte }
func (*SVC_CreateStringTable) PacketType ¶
func (p *SVC_CreateStringTable) PacketType() int
type SVC_CrosshairAngle ¶
type SVC_CrosshairAngle struct {
// fixed point angle (0 to 65536 -> 0 to 360 degrees)
Pitch, Yaw, Roll uint16
}
func (*SVC_CrosshairAngle) PacketType ¶
func (p *SVC_CrosshairAngle) PacketType() int
type SVC_EntityMessage ¶
type SVC_EntityMessage struct { EntityIndex uint16 // 11 bits ClassID uint16 // 9 bits BitLength uint16 // 11 bits Data []byte }
func (*SVC_EntityMessage) PacketType ¶
func (p *SVC_EntityMessage) PacketType() int
type SVC_FixAngle ¶
type SVC_FixAngle struct { Relative bool // fixed point angle (0 to 65536 -> 0 to 360 degrees) Pitch, Yaw, Roll uint16 }
func (*SVC_FixAngle) PacketType ¶
func (p *SVC_FixAngle) PacketType() int
type SVC_GameEvent ¶
func (*SVC_GameEvent) PacketType ¶
func (p *SVC_GameEvent) PacketType() int
type SVC_GameEventList ¶
type SVC_GameEventList struct { NumEvents uint16 // 9 bits BitLength uint32 // 20 bits Data []byte }
func (*SVC_GameEventList) PacketType ¶
func (p *SVC_GameEventList) PacketType() int
type SVC_GetCvarValue ¶
func (*SVC_GetCvarValue) PacketType ¶
func (p *SVC_GetCvarValue) PacketType() int
type SVC_Menu ¶
func (*SVC_Menu) PacketType ¶
type SVC_PacketEntities ¶
type SVC_PacketEntities struct { MaxEntries uint16 // 11 bits DeltaFrom int32 // if -1, written as a single 0 bit. otherwise, prefixed with a 1 bit. Baseline bool UpdatedEntries uint16 // 11 bits BitLength uint32 // 20 bits UpdateBaseline bool Data []byte }
func (*SVC_PacketEntities) PacketType ¶
func (p *SVC_PacketEntities) PacketType() int
type SVC_Prefetch ¶
type SVC_Prefetch struct {
SoundIndex uint16 // 13 bits
}
func (*SVC_Prefetch) PacketType ¶
func (p *SVC_Prefetch) PacketType() int
type SVC_SendTable ¶
func (*SVC_SendTable) PacketType ¶
func (p *SVC_SendTable) PacketType() int
type SVC_ServerInfo ¶
type SVC_ServerInfo struct { Protocol uint16 ServerCount uint32 IsHLTV bool IsReplay bool IsDedicated bool ClientDLLCRC uint32 StringTableCRC uint32 MaxClasses uint16 MapCRC uint32 PlayerSlot uint8 MaxClients uint8 TickInterval float32 OS byte GameDir string MapName string SkyName string HostName string }
func (*SVC_ServerInfo) PacketType ¶
func (p *SVC_ServerInfo) PacketType() int
type SVC_SetPause ¶
type SVC_SetPause struct {
Paused bool
}
func (*SVC_SetPause) PacketType ¶
func (p *SVC_SetPause) PacketType() int
type SVC_SetView ¶
type SVC_SetView struct {
EntityIndex uint16 // 11 bits
}
func (*SVC_SetView) PacketType ¶
func (p *SVC_SetView) PacketType() int
type SVC_Sounds ¶
type SVC_Sounds struct { Reliable bool NumSounds uint8 // if Reliable, there is 1 sound BitLength uint16 // if Reliable, sent as 8 bits Data []byte }
func (*SVC_Sounds) PacketType ¶
func (p *SVC_Sounds) PacketType() int
type SVC_SplitScreen ¶
type SVC_SplitScreen struct { Remove bool Slot uint8 // 2 bits EntityIndex uint16 // 11 bits (name is a guess based on size; haven't verified yet) }
func (*SVC_SplitScreen) PacketType ¶
func (p *SVC_SplitScreen) PacketType() int
type SVC_TempEntities ¶
func (*SVC_TempEntities) PacketType ¶
func (p *SVC_TempEntities) PacketType() int
type SVC_UpdateStringTable ¶
type SVC_UpdateStringTable struct { TableID uint8 // 5 bits ChangedEntries uint16 // if 1, encoded as a single 0 bit, otherwise encoded as a 1 bit followed by a 16 bit integer BitLength uint32 // 20 bits Data []byte }
func (*SVC_UpdateStringTable) PacketType ¶
func (p *SVC_UpdateStringTable) PacketType() int
type SVC_UserMessage ¶
func (*SVC_UserMessage) PacketType ¶
func (p *SVC_UserMessage) PacketType() int
type SVC_VoiceData ¶
type SVC_VoiceData struct { FromClient uint8 Proximity bool // 8 bits(!) BitLength uint16 Data []byte }
func (*SVC_VoiceData) PacketType ¶
func (p *SVC_VoiceData) PacketType() int
type SVC_VoiceInit ¶
func (*SVC_VoiceInit) PacketType ¶
func (p *SVC_VoiceInit) PacketType() int
type SendProp ¶
type SendProp struct { Name string ExcludeDTName string Type SendPropType Priority uint8 Flags SendPropFlags NumElements uint16 LowValue float32 HighValue float32 Bits uint8 }
type SendPropFlags ¶
type SendPropFlags uint32
const ( SPropUnsigned SendPropFlags = 1 << 0 SPropCoord SendPropFlags = 1 << 1 SPropNoScale SendPropFlags = 1 << 2 SPropRoundDown SendPropFlags = 1 << 3 SPropRoundUp SendPropFlags = 1 << 4 SPropNormal SendPropFlags = 1 << 5 SPropExclude SendPropFlags = 1 << 6 SPropXYZE SendPropFlags = 1 << 7 SPropInsideArray SendPropFlags = 1 << 8 SPropProxyAlwaysYes SendPropFlags = 1 << 9 SPropIsAVectorElem SendPropFlags = 1 << 10 SPropCollapsible SendPropFlags = 1 << 11 SPropCoordMP SendPropFlags = 1 << 12 SPropCoordMPLowPrecision SendPropFlags = 1 << 13 SPropCoordMPIntegral SendPropFlags = 1 << 14 SPropCellCoord SendPropFlags = 1 << 15 SPropCellCoordLowPrecision SendPropFlags = 1 << 16 SPropCellCoordIntegral SendPropFlags = 1 << 17 SPropChangesOften SendPropFlags = 1 << 18 )
type SendPropType ¶
type SendPropType uint8
const ( SendPropInt SendPropType = 0 SendPropFloat SendPropType = 1 SendPropVector SendPropType = 2 SendPropVectorXY SendPropType = 3 SendPropString SendPropType = 4 SendPropArray SendPropType = 5 SendPropDataTable SendPropType = 6 SendPropInt64 SendPropType = 7 NumSendPropTypes SendPropType = 8 )
func (SendPropType) String ¶
func (i SendPropType) String() string
type SendTables ¶
type SendTables []SendTable
type ServerClassInfo ¶
type ServerClasses ¶
type ServerClasses []ServerClassInfo
type SignonState ¶
type SignonState uint8
const ( SignonStateNone SignonState = 0 SignonStateChallenge SignonState = 1 SignonStateConnected SignonState = 2 SignonStateNew SignonState = 3 SignonStatePreSpawn SignonState = 4 SignonStateSpawn SignonState = 5 SignonStateFull SignonState = 6 SignonStateChangeLevel SignonState = 7 )
func (SignonState) String ¶
func (i SignonState) String() string
type StringTable ¶
type StringTable struct { Name string Strings []StringTableEntry Client []StringTableEntry MaxStrings int EntryBits int IsFilenames bool UserDataFixedSize bool UserDataSize int UserDataSizeBits int }
func (*StringTable) ReadUpdate ¶
func (t *StringTable) ReadUpdate(r *bits.Reader, numEntries int) error
type StringTableEntry ¶
type StringTables ¶
type StringTables []StringTable
func (*StringTables) CreateFromPacket ¶
func (t *StringTables) CreateFromPacket(p *SVC_CreateStringTable) error
func (StringTables) Find ¶
func (t StringTables) Find(name string) *StringTable
func (StringTables) UpdateFromPacket ¶
func (t StringTables) UpdateFromPacket(p *SVC_UpdateStringTable) error
Click to show internal directories.
Click to hide internal directories.