diff options
Diffstat (limited to 'src/qcommon/qcommon.h')
-rw-r--r-- | src/qcommon/qcommon.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/qcommon/qcommon.h b/src/qcommon/qcommon.h index 165dccae..28834168 100644 --- a/src/qcommon/qcommon.h +++ b/src/qcommon/qcommon.h @@ -193,7 +193,8 @@ void NET_Sleep(int msec); #define MAX_DOWNLOAD_WINDOW 48 // ACK window of 48 download chunks. Cannot set this higher, or clients // will overflow the reliable commands buffer #define MAX_DOWNLOAD_BLKSIZE 1024 // 896 byte block chunks - + +#define NETCHAN_GENCHECKSUM(challenge, sequence) ((challenge) ^ ((sequence) * (challenge))) /* Netchan handles packet fragmentation and out of order / duplicate suppression @@ -222,10 +223,12 @@ typedef struct { int unsentFragmentStart; int unsentLength; byte unsentBuffer[MAX_MSGLEN]; + + int challenge; } netchan_t; void Netchan_Init( int qport ); -void Netchan_Setup( netsrc_t sock, netchan_t *chan, netadr_t adr, int qport ); +void Netchan_Setup(netsrc_t sock, netchan_t *chan, netadr_t adr, int qport, int challenge); void Netchan_Transmit( netchan_t *chan, int length, const byte *data ); void Netchan_TransmitNextFragment( netchan_t *chan ); @@ -241,7 +244,7 @@ PROTOCOL ============================================================== */ -#define PROTOCOL_VERSION 70 +#define PROTOCOL_VERSION 71 // maintain a list of compatible protocols for demo playing // NOTE: that stuff only works with two digits protocols |