mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-12-26 04:11:18 +00:00
No more modulo bullshit in VERSION
VERSION is the first number, SUBVERSION is the second number, and the third number burns in hell; we really don't need that precision # Conflicts: # src/doomdef.h
This commit is contained in:
parent
0a50317e49
commit
1fac0505a4
3 changed files with 10 additions and 10 deletions
|
@ -1915,7 +1915,7 @@ void CL_UpdateServerList(boolean internetsearch, INT32 room)
|
|||
{
|
||||
char version[8] = "";
|
||||
#if VERSION > 0 || SUBVERSION > 0
|
||||
snprintf(version, sizeof (version), "%d.%d.%d", VERSION/100, VERSION%100, SUBVERSION);
|
||||
snprintf(version, sizeof (version), "%d.%d", VERSION, SUBVERSION);
|
||||
#else
|
||||
strcpy(version, GetRevisionString());
|
||||
#endif
|
||||
|
@ -2457,8 +2457,8 @@ static void CL_ConnectToServer(boolean viams)
|
|||
gametypestr = Gametype_Names[num];
|
||||
if (gametypestr)
|
||||
CONS_Printf(M_GetText("Gametype: %s\n"), gametypestr);
|
||||
CONS_Printf(M_GetText("Version: %d.%d.%u\n"), serverlist[i].info.version/100,
|
||||
serverlist[i].info.version%100, serverlist[i].info.subversion);
|
||||
CONS_Printf(M_GetText("Version: %d.%d\n"),
|
||||
serverlist[i].info.version, serverlist[i].info.subversion);
|
||||
}
|
||||
SL_ClearServerList(servernode);
|
||||
#endif
|
||||
|
@ -3375,8 +3375,8 @@ static void Got_RemovePlayer(UINT8 **p, INT32 playernum);
|
|||
// called one time at init
|
||||
void D_ClientServerInit(void)
|
||||
{
|
||||
DEBFILE(va("- - -== SRB2Kart v%d.%.2d.%d "VERSIONSTRING" debugfile ==- - -\n",
|
||||
VERSION/100, VERSION%100, SUBVERSION));
|
||||
DEBFILE(va("- - -== SRB2Kart v%d.%d "VERSIONSTRING" debugfile ==- - -\n",
|
||||
VERSION, SUBVERSION));
|
||||
|
||||
#ifndef NONET
|
||||
COM_AddCommand("getplayernum", Command_GetPlayerNum);
|
||||
|
@ -3872,7 +3872,7 @@ static void HandleConnect(SINT8 node)
|
|||
SV_SendRefuse(node, M_GetText("You have been banned\nfrom the server"));
|
||||
else if (netbuffer->u.clientcfg.version != VERSION
|
||||
|| netbuffer->u.clientcfg.subversion != SUBVERSION)
|
||||
SV_SendRefuse(node, va(M_GetText("Different SRB2Kart versions cannot\nplay a netgame!\n(server version %d.%d.%d)"), VERSION/100, VERSION%100, SUBVERSION));
|
||||
SV_SendRefuse(node, va(M_GetText("Different SRB2Kart versions cannot\nplay a netgame!\n(server version %d.%d)"), VERSION, SUBVERSION));
|
||||
else if (!cv_allownewplayer.value && node)
|
||||
SV_SendRefuse(node, M_GetText("The server is not accepting\njoins for the moment"));
|
||||
else if (D_NumPlayers() >= maxplayers)
|
||||
|
|
|
@ -149,8 +149,8 @@ extern FILE *logstream;
|
|||
// most interface strings are ignored in development mode.
|
||||
// we use comprevision and compbranch instead.
|
||||
#else
|
||||
#define VERSION 102 // Game version
|
||||
#define SUBVERSION 0 // more precise version number
|
||||
#define VERSION 1 // Game version
|
||||
#define SUBVERSION 2 // more precise version number
|
||||
#define VERSIONSTRING "v1.2"
|
||||
#define VERSIONSTRINGW L"v1.2"
|
||||
// Hey! If you change this, add 1 to the MODVERSION below! Otherwise we can't force updates!
|
||||
|
|
|
@ -751,7 +751,7 @@ static INT32 AddToMasterServer(boolean firstadd)
|
|||
strcpy(info->name, cv_servername.string);
|
||||
M_Memcpy(&info->room, & room, sizeof (INT32));
|
||||
#if VERSION > 0 || SUBVERSION > 0
|
||||
sprintf(info->version, "%d.%d.%d", VERSION/100, VERSION%100, SUBVERSION);
|
||||
sprintf(info->version, "%d.%d", VERSION, SUBVERSION);
|
||||
#else // Trunk build, send revision info
|
||||
strcpy(info->version, GetRevisionString());
|
||||
#endif
|
||||
|
@ -789,7 +789,7 @@ static INT32 RemoveFromMasterSever(void)
|
|||
strcpy(info->ip, "");
|
||||
strcpy(info->port, int2str(current_port));
|
||||
strcpy(info->name, registered_server.name);
|
||||
sprintf(info->version, "%d.%d.%d", VERSION/100, VERSION%100, SUBVERSION);
|
||||
sprintf(info->version, "%d.%d", VERSION, SUBVERSION);
|
||||
|
||||
msg.type = REMOVE_SERVER_MSG;
|
||||
msg.length = (UINT32)sizeof (msg_server_t);
|
||||
|
|
Loading…
Reference in a new issue