ddnet/src/engine/shared/protocol_ex.h
heinrich5991 f31e081bd4 Remove all checking for the gametype in the game
OK, maybe not actually remove because it is kept for fallback when the
new method isn't available.

The whole gametype parsing business had the same downsides as user agent
parsing on the web, hence I removed it while keeping behavior the same.

This allows servers to explicitly opt in or out of certain bug
workarounds and other client behavior. This increases the complexity of
different configurations that are available in the client (which is a
bad thing).
2019-06-14 00:28:59 +02:00

34 lines
825 B
C

#ifndef ENGINE_SHARED_PROTOCOL_EX_H
#define ENGINE_SHARED_PROTOCOL_EX_H
#include <engine/message.h>
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
OFFSET_TEEHISTORIAN_UUID,
UNPACKMESSAGE_ERROR=0,
UNPACKMESSAGE_OK,
UNPACKMESSAGE_ANSWER,
SERVERCAP_CURVERSION=1,
SERVERCAPFLAG_DDNET=1<<0,
SERVERCAPFLAG_CHATTIMEOUTCODE=1<<1,
};
void RegisterUuids(class CUuidManager *pManager);
bool NetworkExDefaultHandler(int *pID, struct CUuid *pUuid, CUnpacker *pUnpacker, CMsgPacker *pPacker, int Type);
int UnpackMessageID(int *pID, bool *pSys, struct CUuid *pUuid, CUnpacker *pUnpacker, CMsgPacker *pPacker);
#endif // ENGINE_SHARED_PROTOCOL_EX_H