mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-11 02:28:18 +00:00
1b4131a7fd
(cherry picked from commit 9023796d27
)
28 lines
613 B
C++
28 lines
613 B
C++
/* (c) Magnus Auvinen. See licence.txt in the root of the distribution for more information. */
|
|
/* If you are missing that file, acquire a complete release at teeworlds.com. */
|
|
#ifndef ENGINE_MESSAGE_H
|
|
#define ENGINE_MESSAGE_H
|
|
|
|
#include <engine/shared/packer.h>
|
|
#include <engine/shared/uuid_manager.h>
|
|
|
|
class CMsgPacker : public CPacker
|
|
{
|
|
public:
|
|
CMsgPacker(int Type, bool System=false)
|
|
{
|
|
Reset();
|
|
if(Type < OFFSET_UUID)
|
|
{
|
|
AddInt((Type<<1)|(System?1:0));
|
|
}
|
|
else
|
|
{
|
|
AddInt((0<<1)|(System?1:0)); // NETMSG_EX, NETMSGTYPE_EX
|
|
g_UuidManager.PackUuid(Type, this);
|
|
}
|
|
}
|
|
};
|
|
|
|
#endif
|