ddnet/src/engine/shared/protocol_ex.h

41 lines
1,020 B
C
Raw Normal View History

#ifndef ENGINE_SHARED_PROTOCOL_EX_H
#define ENGINE_SHARED_PROTOCOL_EX_H
2022-06-16 15:06:15 +00:00
#include <engine/shared/uuid_manager.h>
class CMsgPacker;
class CUnpacker;
enum
{
NETMSG_EX_INVALID = UUID_INVALID,
NETMSG_EX_UNKNOWN = UUID_UNKNOWN,
OFFSET_NETMSG_UUID = OFFSET_UUID,
__NETMSG_UUID_HELPER = OFFSET_NETMSG_UUID - 1,
#define UUID(id, name) id,
#include "protocol_ex_msgs.h"
#undef UUID
2018-01-11 15:01:13 +00:00
OFFSET_TEEHISTORIAN_UUID,
UNPACKMESSAGE_ERROR = 0,
UNPACKMESSAGE_OK,
UNPACKMESSAGE_ANSWER,
SERVERCAP_CURVERSION = 5,
SERVERCAPFLAG_DDNET = 1 << 0,
SERVERCAPFLAG_CHATTIMEOUTCODE = 1 << 1,
SERVERCAPFLAG_ANYPLAYERFLAG = 1 << 2,
SERVERCAPFLAG_PINGEX = 1 << 3,
SERVERCAPFLAG_ALLOWDUMMY = 1 << 4,
SERVERCAPFLAG_SYNCWEAPONINPUT = 1 << 5,
};
2022-06-16 15:06:15 +00:00
void RegisterUuids(CUuidManager *pManager);
bool NetworkExDefaultHandler(int *pID, CUuid *pUuid, CUnpacker *pUnpacker, CMsgPacker *pPacker, int Type);
2022-06-16 15:06:15 +00:00
int UnpackMessageID(int *pID, bool *pSys, CUuid *pUuid, CUnpacker *pUnpacker, CMsgPacker *pPacker);
#endif // ENGINE_SHARED_PROTOCOL_EX_H