mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Merge #1431
1431: Decode extended packets for the dummy as well r=def- a=heinrich5991 Co-authored-by: heinrich5991 <heinrich5991@gmail.com>
This commit is contained in:
commit
f3e3701ae2
|
@ -1964,14 +1964,22 @@ void CClient::ProcessServerPacketDummy(CNetChunk *pPacket)
|
|||
{
|
||||
CUnpacker Unpacker;
|
||||
Unpacker.Reset(pPacket->m_pData, pPacket->m_DataSize);
|
||||
CMsgPacker Packer(NETMSG_EX);
|
||||
|
||||
// unpack msgid and system flag
|
||||
int Msg = Unpacker.GetInt();
|
||||
int Sys = Msg&1;
|
||||
Msg >>= 1;
|
||||
int Msg;
|
||||
bool Sys;
|
||||
CUuid Uuid;
|
||||
|
||||
if(Unpacker.Error())
|
||||
int Result = UnpackMessageID(&Msg, &Sys, &Uuid, &Unpacker, &Packer);
|
||||
if(Result == UNPACKMESSAGE_ERROR)
|
||||
{
|
||||
return;
|
||||
}
|
||||
else if(Result == UNPACKMESSAGE_ANSWER)
|
||||
{
|
||||
SendMsgEx(&Packer, MSGFLAG_VITAL, true);
|
||||
}
|
||||
|
||||
if(Sys)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue