Documentation ¶
Index ¶
- Variables
- func GetPacketType(command pb.EDemoCommands) (proto.Message, error)
- func HandleClassinfo(p *Packet) error
- func HandleEmbedded(p *Packet) error
- func HandleFileInfo(p *Packet) error
- func HandleFullEmbedded(p *Packet) error
- func HandlePlaceHolder(p *Packet) error
- func HandleSendTables(p *Packet) error
- func HandleStringTables(p *Packet) error
- type Packet
- type PacketHandler
Constants ¶
This section is empty.
Variables ¶
View Source
var PacketHandlers = map[pb.EDemoCommands]PacketHandler{ pb.EDemoCommands_DEM_Stop: HandlePlaceHolder, pb.EDemoCommands_DEM_FileHeader: HandlePlaceHolder, pb.EDemoCommands_DEM_FileInfo: HandleFileInfo, pb.EDemoCommands_DEM_SyncTick: HandlePlaceHolder, pb.EDemoCommands_DEM_SendTables: HandleSendTables, pb.EDemoCommands_DEM_ClassInfo: HandleClassinfo, pb.EDemoCommands_DEM_StringTables: HandleStringTables, pb.EDemoCommands_DEM_Packet: HandleEmbedded, pb.EDemoCommands_DEM_SignonPacket: HandleEmbedded, pb.EDemoCommands_DEM_ConsoleCmd: HandlePlaceHolder, pb.EDemoCommands_DEM_CustomData: HandlePlaceHolder, pb.EDemoCommands_DEM_CustomDataCallbacks: HandlePlaceHolder, pb.EDemoCommands_DEM_UserCmd: HandlePlaceHolder, pb.EDemoCommands_DEM_FullPacket: HandlePlaceHolder, pb.EDemoCommands_DEM_SaveGame: HandlePlaceHolder, pb.EDemoCommands_DEM_SpawnGroups: HandlePlaceHolder, }
Packet type to handler function
View Source
var PacketTypes = map[pb.EDemoCommands]string{ pb.EDemoCommands_DEM_Error: "", pb.EDemoCommands_DEM_Stop: "mango.CDemoStop", pb.EDemoCommands_DEM_FileHeader: "mango.CDemoFileHeader", pb.EDemoCommands_DEM_FileInfo: "mango.CDemoFileInfo", pb.EDemoCommands_DEM_SyncTick: "mango.CDemoSyncTick", pb.EDemoCommands_DEM_SendTables: "mango.CDemoSendTables", pb.EDemoCommands_DEM_ClassInfo: "mango.CDemoClassInfo", pb.EDemoCommands_DEM_StringTables: "mango.CDemoStringTables", pb.EDemoCommands_DEM_Packet: "mango.CDemoPacket", pb.EDemoCommands_DEM_SignonPacket: "mango.CDemoPacket", pb.EDemoCommands_DEM_ConsoleCmd: "mango.CDemoConsoleCmd", pb.EDemoCommands_DEM_CustomData: "mango.CDemoCustomData", pb.EDemoCommands_DEM_CustomDataCallbacks: "mango.CDemoCustomDataCallbacks", pb.EDemoCommands_DEM_UserCmd: "mango.CDemoUserCmd", pb.EDemoCommands_DEM_FullPacket: "mango.CDemoFullPacket", pb.EDemoCommands_DEM_SaveGame: "mango.CDemoSaveGame", pb.EDemoCommands_DEM_SpawnGroups: "mango.CDemoSpawnGroups", pb.EDemoCommands_DEM_Max: "", }
Map of packet type to struct name for creating the correct proto instance
View Source
var Players = map[int]string{}
View Source
var StringTables = map[string][]*pb.CDemoStringTablesItemsT{}
Functions ¶
func GetPacketType ¶
func GetPacketType(command pb.EDemoCommands) (proto.Message, error)
func HandleClassinfo ¶
func HandleFileInfo ¶
func HandleFullEmbedded ¶
Process a packet with embedded data
func HandlePlaceHolder ¶
Placeholder for unimplemented message types
func HandleSendTables ¶
func HandleStringTables ¶
Process a string tables packet by saving the tables and putting them into memory
Types ¶
type Packet ¶
type PacketHandler ¶
Click to show internal directories.
Click to hide internal directories.