From c157acf9be478fddaf5d3f93c1cc7c088e0325fd Mon Sep 17 00:00:00 2001 From: Sally Coolatta Date: Fri, 5 Apr 2024 11:31:48 -0400 Subject: [PATCH 1/5] Kill MODID SRB2APPLICATION has replaced all of its uses in the modern Master Server, let's not keep this old cruft around. Exposed to Lua as "APPLICATION", in all caps. --- src/d_netcmd.c | 2 +- src/deh_tables.c | 1 - src/lua_script.c | 4 ++++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/d_netcmd.c b/src/d_netcmd.c index 1a0dd9532..03540ade7 100644 --- a/src/d_netcmd.c +++ b/src/d_netcmd.c @@ -5178,7 +5178,7 @@ static void Command_Version_f(void) #ifdef UPDATE_ALERT static void Command_ModDetails_f(void) { - CONS_Printf(M_GetText("Mod ID: %d\nMod Version: %d\nCode Base:%d\n"), MODID, MODVERSION, CODEBASE); + CONS_Printf(M_GetText("Mod App Name: %s\nMod Version: %d\nCode Base:%d\n"), SRB2APPLICATION, MODVERSION, CODEBASE); } #endif diff --git a/src/deh_tables.c b/src/deh_tables.c index 79449d929..844e0efeb 100644 --- a/src/deh_tables.c +++ b/src/deh_tables.c @@ -4479,7 +4479,6 @@ struct int_const_s const INT_CONST[] = { {"MUSICRATE",MUSICRATE}, {"RING_DIST",RING_DIST}, {"PUSHACCEL",PUSHACCEL}, - {"MODID",MODID}, // I don't know, I just thought it would be cool for a wad to potentially know what mod it was loaded into. {"MODVERSION",MODVERSION}, // or what version of the mod this is. {"CODEBASE",CODEBASE}, // or what release of SRB2 this is. {"NEWTICRATE",NEWTICRATE}, // TICRATE*NEWTICRATERATIO diff --git a/src/lua_script.c b/src/lua_script.c index fbcc4526e..5aabf3709 100644 --- a/src/lua_script.c +++ b/src/lua_script.c @@ -336,6 +336,10 @@ int LUA_PushGlobals(lua_State *L, const char *word) } else if (fastcmp(word,"VERSIONSTRING")) { lua_pushstring(L, VERSIONSTRING); return 1; + } else if (fastcmp(word,"APPLICATION")) { + // I don't know, I just thought it would be cool for a wad to potentially know what mod it was loaded into. + lua_pushstring(L, SRB2APPLICATION); + return 1; } else if (fastcmp(word,"gamespeed")) { lua_pushinteger(L, gamespeed); return 1; From 4e72836ea1e2c15f6ee08f924625ab34909e04ed Mon Sep 17 00:00:00 2001 From: Sally Coolatta Date: Fri, 5 Apr 2024 11:41:39 -0400 Subject: [PATCH 2/5] Update version numbers MODVERSION could be changed to 1 because RR has a different application name already, but I made it increment from SRB2Kart's current value anyways to be safe. --- src/version.h | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/version.h b/src/version.h index c8b673542..c76c882a9 100644 --- a/src/version.h +++ b/src/version.h @@ -1,15 +1,10 @@ -#define SRB2VERSION "1.0"/* this must be the first line, for cmake !! */ - -// The Modification ID; must be obtained from a Master Server Admin ( https://mb.srb2.org/showgroups.php ). -// DO NOT try to set this otherwise, or your modification will be unplayable through the Master Server. -// "17" is the default mod ID for SRB2Kart. -#define MODID 17 +#define SRB2VERSION "2.0"/* this must be the first line, for cmake !! */ // The Modification Version, starting from 1. Do not follow your version string for this, // it's only for detection of the version the player is using so the MS can alert them of an update. // Only set it higher, not lower, obviously. // Note that we use this to help keep internal testing in check; this is why v2.0 is not version "2". -#define MODVERSION 6 +#define MODVERSION 11 // Define this as a prerelease version suffix // #define BETAVERSION "Alpha" From c8b0ac1ad483076729733b51ae671e1298f93998 Mon Sep 17 00:00:00 2001 From: Sally Coolatta Date: Fri, 5 Apr 2024 11:45:48 -0400 Subject: [PATCH 3/5] Fix update alert - UPDATE_ALERT is not defined for DEVELOP, instead of being commented out manually. - Added button prompt to the alert, removed "Press a key" text from the alert --- src/doomdef.h | 8 +++----- src/menus/play-online-server-browser.c | 2 +- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/doomdef.h b/src/doomdef.h index a43df92fd..bbe767eee 100644 --- a/src/doomdef.h +++ b/src/doomdef.h @@ -126,8 +126,8 @@ extern char logfilename[1024]; // the other options the same. // Comment out this line to completely disable update alerts (recommended for testing, but not for release) -#ifndef BETAVERSION -//#define UPDATE_ALERT +#if !defined(BETAVERSION) && !defined(DEVELOP) +#define UPDATE_ALERT #endif // The string used in the alert that pops up in the event of an update being available. @@ -137,9 +137,7 @@ extern char logfilename[1024]; "Please visit kartkrew.org to download it.\n"\ "\n"\ "You are using version: %s\n"\ -"The newest version is: %s\n"\ -"\n"\ -"(Press a key)\n" +"The newest version is: %s\n" // For future use, the codebase is the version of SRB2 that the modification is based on, // and should not be changed unless you have merged changes between versions of SRB2 diff --git a/src/menus/play-online-server-browser.c b/src/menus/play-online-server-browser.c index 6798e5174..68880fa09 100644 --- a/src/menus/play-online-server-browser.c +++ b/src/menus/play-online-server-browser.c @@ -205,7 +205,7 @@ static void M_CheckMODVersion(int id) #ifdef HAVE_THREADS I_lock_mutex(&k_menu_mutex); #endif - M_StartMessage("Game Update", updatestring, NULL, MM_NOTHING, NULL, NULL); + M_StartMessage("Game Update", updatestring, NULL, MM_NOTHING, NULL, "Return to Menu"); #ifdef HAVE_THREADS I_unlock_mutex(k_menu_mutex); #endif From d2b73b709651c5829ad796ccc8f02ece9f3e6b38 Mon Sep 17 00:00:00 2001 From: Sally Coolatta Date: Fri, 5 Apr 2024 11:48:18 -0400 Subject: [PATCH 4/5] #if out more execversion code It's not relevant to a first release at all. --- src/command.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/command.c b/src/command.c index 5ce45d263..1b925b7b8 100644 --- a/src/command.c +++ b/src/command.c @@ -2364,17 +2364,13 @@ static boolean CV_FilterVarByVersion(consvar_t *v, const char *valstr) if (!(v->flags & CV_SAVE)) return true; - if (GETMAJOREXECVERSION(cv_execversion.value) < 2) // 2 = 1.0.2 +#if 0 // We don't have changed saved cvars yet + if (GETMAJOREXECVERSION(cv_execversion.value) < 2) { -#if 0 - // We don't have changed saved cvars yet - if (!stricmp(v->name, "alwaysmlook") - || !stricmp(v->name, "alwaysmlook2") - || !stricmp(v->name, "mousemove") - || !stricmp(v->name, "mousemove2")) + if (!stricmp(v->name, "example")) return false; -#endif } +#endif return true; } From 2523288a552bff44583df867cc485430ba678122 Mon Sep 17 00:00:00 2001 From: Sally Coolatta Date: Fri, 5 Apr 2024 12:02:13 -0400 Subject: [PATCH 5/5] Changed my mind, MODVERSION should definitely be 1 --- src/version.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/version.h b/src/version.h index c76c882a9..9d4f99c4c 100644 --- a/src/version.h +++ b/src/version.h @@ -4,7 +4,7 @@ // it's only for detection of the version the player is using so the MS can alert them of an update. // Only set it higher, not lower, obviously. // Note that we use this to help keep internal testing in check; this is why v2.0 is not version "2". -#define MODVERSION 11 +#define MODVERSION 1 // Define this as a prerelease version suffix // #define BETAVERSION "Alpha"