1
This commit is contained in:
parent
dca17a2d72
commit
fd72ea5605
@ -10,6 +10,18 @@
|
||||
|
||||
namespace f8
|
||||
{
|
||||
|
||||
MsgHdr* MsgHdr::Clone()
|
||||
{
|
||||
MsgHdr* hdr = (MsgHdr*)malloc(sizeof(MsgHdr));
|
||||
*hdr = *this;
|
||||
if (hdr->buflen > 0) {
|
||||
hdr->buf = (char*)malloc(hdr->buflen);
|
||||
memmove((void*)hdr->buf, (void*)buf, buflen);
|
||||
}
|
||||
return hdr;
|
||||
}
|
||||
|
||||
int Net_GetMessageId(::google::protobuf::Message& msg)
|
||||
{
|
||||
std::string msgname;
|
||||
|
@ -83,6 +83,8 @@ namespace f8
|
||||
int offset;
|
||||
Player *hum = nullptr;
|
||||
const void* user_data = nullptr;
|
||||
|
||||
MsgHdr* Clone();
|
||||
};
|
||||
|
||||
const unsigned short MAGIC_CODE = (((unsigned short)'S') << 8) | ((unsigned short)'K');
|
||||
|
Loading…
x
Reference in New Issue
Block a user