From dc75d828ce30cf759030d290ae3e329727cd3b2b Mon Sep 17 00:00:00 2001 From: theAsmodai Date: Thu, 28 Jan 2021 01:43:02 +0300 Subject: [PATCH] Don't generate different challenge on port change (#804) --- rehlds/engine/sv_main.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/rehlds/engine/sv_main.cpp b/rehlds/engine/sv_main.cpp index d9df60d..70ef0a2 100644 --- a/rehlds/engine/sv_main.cpp +++ b/rehlds/engine/sv_main.cpp @@ -1813,8 +1813,7 @@ int g_oldest_challenge = 0; typedef struct challenge_buf_s { uint32_t ip; - uint16_t port; - uint32_t salt[14]; + uint32_t salt[15]; } challenge_buf_t; challenge_buf_t g_raw_challenge_buf; @@ -2529,7 +2528,6 @@ int EXT_FUNC SV_GetChallenge(const netadr_t& adr) #ifdef REHLDS_FIXES uint8_t digest[16]; g_raw_challenge_buf.ip = *(uint32_t*)adr.ip; - g_raw_challenge_buf.port = adr.port; MD5Context_t ctx; MD5Init(&ctx); MD5Update(&ctx, (uint8_t *)&g_raw_challenge_buf, sizeof(g_raw_challenge_buf));