mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +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
This commit is contained in:
parent
71b6c44af0
commit
da953c9dae
3 changed files with 9 additions and 9 deletions
|
|
@ -1880,7 +1880,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
|
||||
|
|
@ -2355,8 +2355,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
|
||||
|
|
@ -3296,8 +3296,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);
|
||||
|
|
@ -3822,7 +3822,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)
|
||||
|
|
|
|||
|
|
@ -150,7 +150,7 @@ extern char logfilename[1024];
|
|||
// most interface strings are ignored in development mode.
|
||||
// we use comprevision and compbranch instead.
|
||||
#else
|
||||
#define VERSION 200 // Game version
|
||||
#define VERSION 2 // Game version
|
||||
#define SUBVERSION 0 // more precise version number
|
||||
#define VERSIONSTRING "v2.0"
|
||||
#define VERSIONSTRINGW L"v2.0"
|
||||
|
|
|
|||
|
|
@ -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…
Add table
Reference in a new issue