Documentation ¶
Index ¶
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
Functions ¶
func GetPacketType ¶
func GetPacketType(command pb.EDemoCommands) (proto.Message, error)
Types ¶
type Packet ¶
type PacketHandler ¶
type PacketHandler func(*Packet, *mappings.LookupObjects) error
Click to show internal directories.
Click to hide internal directories.