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.
This commit is contained in:
Sally Coolatta 2024-04-05 11:08:09 -04:00
parent e19ed5bc29
commit af9ddb5519
3 changed files with 0 additions and 11 deletions

View file

@ -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);

View file

@ -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

View file

@ -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(