2
0
mirror of https://github.com/rehlds/rehlds.git synced 2025-01-29 23:18:06 +03:00

Merge pull request #401 from Chuvi-w/RemoveSplitpacketMagicNumber

Changed magic number -2 (0xFFFFFFFE to NET_HEADER_FLAG_SPLITPACKET)
This commit is contained in:
theAsmodai 2017-03-12 23:10:39 +03:00 committed by GitHub
commit 3571706f02
2 changed files with 4 additions and 2 deletions

View File

@ -1028,7 +1028,7 @@ qboolean NET_QueuePacket(netsrc_t sock)
NET_TransferRawData(&in_message, buf, ret);
if (*(uint32 *)in_message.data != 0xFFFFFFFE)
if (*(int32 *)in_message.data != NET_HEADER_FLAG_SPLITPACKET)
{
return NET_LagPacket(1, sock, &in_from, &in_message);
}
@ -1350,7 +1350,7 @@ int NET_SendLong(netsrc_t sock, SOCKET s, const char *buf, int len, int flags, c
}
pPacket = (SPLITPACKET *)packet;
pPacket->netID = -2;
pPacket->netID = NET_HEADER_FLAG_SPLITPACKET;
pPacket->sequenceNumber = gSequenceNumber;
packetNumber = 0;
totalSent = 0;

View File

@ -54,6 +54,8 @@
#define NUM_MSG_QUEUES 40
#define MSG_QUEUE_SIZE 1536
#define NET_HEADER_FLAG_SPLITPACKET -2
typedef struct loopmsg_s
{
unsigned char data[NET_MAX_MESSAGE];