ddnet/src/engine/message.h

28 lines
558 B
C
Raw Normal View History

2010-11-20 10:37:14 +00:00
/* (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. */
2010-05-29 07:25:38 +00:00
#ifndef ENGINE_MESSAGE_H
#define ENGINE_MESSAGE_H
2009-10-29 12:14:31 +00:00
2010-05-29 07:25:38 +00:00
#include <engine/shared/packer.h>
#include <engine/shared/uuid_manager.h>
2009-10-29 12:14:31 +00:00
2010-05-29 07:25:38 +00:00
class CMsgPacker : public CPacker
2009-10-29 12:14:31 +00:00
{
public:
2010-05-29 07:25:38 +00:00
CMsgPacker(int Type)
{
Reset();
if(Type < OFFSET_UUID)
{
AddInt(Type);
}
else
{
AddInt(0); // NETMSG_EX, NETMSGTYPE_EX
g_UuidManager.PackUuid(Type, this);
}
2010-05-29 07:25:38 +00:00
}
2009-10-29 12:14:31 +00:00
};
2010-05-29 07:25:38 +00:00
#endif