From af9ddb551977d678909c3f59e837812269486e48 Mon Sep 17 00:00:00 2001 From: Sally Coolatta Date: Fri, 5 Apr 2024 11:08:09 -0400 Subject: [PATCH] Keep PT_SERVERINFO struct the same in all builds Sends the commit hash in all builds now, just doesn't do anything with it in release builds. Makes web view development easier according to Tyron. --- src/d_clisrv.c | 2 -- src/d_clisrv.h | 2 -- src/d_main.cpp | 7 ------- 3 files changed, 11 deletions(-) diff --git a/src/d_clisrv.c b/src/d_clisrv.c index edb1d167c..08fe916e9 100644 --- a/src/d_clisrv.c +++ b/src/d_clisrv.c @@ -1018,10 +1018,8 @@ static void SV_SendServerInfo(INT32 node, tic_t servertime) netbuffer->u.serverinfo.version = VERSION; netbuffer->u.serverinfo.subversion = SUBVERSION; -#ifdef DEVELOP memcpy(netbuffer->u.serverinfo.commit, comprevision_abbrev_bin, GIT_SHA_ABBREV); -#endif strncpy(netbuffer->u.serverinfo.application, SRB2APPLICATION, sizeof netbuffer->u.serverinfo.application); diff --git a/src/d_clisrv.h b/src/d_clisrv.h index 48aa2cccb..c9277fac6 100644 --- a/src/d_clisrv.h +++ b/src/d_clisrv.h @@ -298,9 +298,7 @@ struct serverinfo_pak char application[MAXAPPLICATION]; UINT8 version; UINT8 subversion; -#ifdef DEVELOP UINT8 commit[GIT_SHA_ABBREV]; -#endif UINT8 numberofplayer; UINT8 maxplayer; UINT8 refusereason; // 0: joinable, 1: joins disabled, 2: full diff --git a/src/d_main.cpp b/src/d_main.cpp index d831c6072..7f8015438 100644 --- a/src/d_main.cpp +++ b/src/d_main.cpp @@ -127,9 +127,7 @@ extern "C" consvar_t cv_lua_profile, cv_menuframeskip; int VERSION; int SUBVERSION; -#ifdef DEVELOP UINT8 comprevision_abbrev_bin[GIT_SHA_ABBREV]; -#endif #ifdef HAVE_DISCORDRPC #include "discord.h" @@ -1412,7 +1410,6 @@ static void IdentifyVersion(void) #undef MUSICTEST } -#ifdef DEVELOP static void D_AbbrevCommit (void) { @@ -1424,7 +1421,6 @@ D_AbbrevCommit (void) &comprevision_abbrev_bin[i]); } } -#endif static void D_ConvertVersionNumbers (void) @@ -1478,10 +1474,7 @@ void D_SRB2Main(void) /* break the version string into version numbers, for netplay */ D_ConvertVersionNumbers(); - -#ifdef DEVELOP D_AbbrevCommit(); -#endif // Print GPL notice for our console users (Linux) CONS_Printf(