From 0e7460811e67db3bfaa4d1e620702f93cefb289b Mon Sep 17 00:00:00 2001 From: Sally Coolatta Date: Tue, 6 Apr 2021 23:56:22 -0400 Subject: [PATCH] Fix avgpwrlvl --- src/d_clisrv.c | 4 ++-- src/d_clisrv.h | 5 +---- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/d_clisrv.c b/src/d_clisrv.c index 920a79b84..996a0a23e 100644 --- a/src/d_clisrv.c +++ b/src/d_clisrv.c @@ -989,13 +989,13 @@ static void SV_SendServerInfo(INT32 node, tic_t servertime) netbuffer->u.serverinfo.httpsource[MAX_MIRROR_LENGTH-1] = '\0'; - p = PutFileNeeded(0); - if (cv_kartusepwrlv.value) netbuffer->u.serverinfo.avgpwrlv = K_CalculatePowerLevelAvg(); else netbuffer->u.serverinfo.avgpwrlv = -1; + p = PutFileNeeded(0); + HSendPacket(node, false, 0, p - ((UINT8 *)&netbuffer->u)); } diff --git a/src/d_clisrv.h b/src/d_clisrv.h index 9aedbdba3..93593d736 100644 --- a/src/d_clisrv.h +++ b/src/d_clisrv.h @@ -275,11 +275,8 @@ typedef struct UINT8 actnum; UINT8 iszone; char httpsource[MAX_MIRROR_LENGTH]; // HTTP URL to download from, always defined for compatibility - UINT8 fileneeded[MAXFILENEEDED]; // is filled with writexxx (byteptr.h) - // Anything beyond this point won't be read by the normal SRB2 Master Server display. - // The MS uses a simple unpack, so the size of the packet above shouldn't be changed, either. - // As long as those two conditions are met, we can add as much information as we want to the end. INT16 avgpwrlv; // Kart avg power level + UINT8 fileneeded[MAXFILENEEDED]; // is filled with writexxx (byteptr.h) } ATTRPACK serverinfo_pak; typedef struct