From 386fc4959e72014fa1910812154eb05ebf8f28ae Mon Sep 17 00:00:00 2001 From: Chuvi Date: Sun, 12 Mar 2017 19:36:11 +0300 Subject: [PATCH] Changed magic number -2 (0xFFFFFFFE to NET_HEADER_FLAG_SPLITPACKET) --- rehlds/engine/net_ws.cpp | 4 ++-- rehlds/engine/net_ws.h | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/rehlds/engine/net_ws.cpp b/rehlds/engine/net_ws.cpp index c34704b..5774393 100644 --- a/rehlds/engine/net_ws.cpp +++ b/rehlds/engine/net_ws.cpp @@ -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; diff --git a/rehlds/engine/net_ws.h b/rehlds/engine/net_ws.h index 8e43d9d..27d034e 100644 --- a/rehlds/engine/net_ws.h +++ b/rehlds/engine/net_ws.h @@ -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];