From 9ce7520e53ccc7a7c5ae4aa4250785b75aa21974 Mon Sep 17 00:00:00 2001 From: VelocitOni Date: Fri, 3 May 2024 19:59:53 -0400 Subject: [PATCH 1/5] Auto Roulette Warning Warn the player that we didn't fucking design an RNG-baed game LOL --- src/k_menufunc.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/k_menufunc.c b/src/k_menufunc.c index 4a42243d1..f36cfb5f9 100644 --- a/src/k_menufunc.c +++ b/src/k_menufunc.c @@ -210,6 +210,27 @@ static void M_ChangeCvar(INT32 choice) } #endif +if (cvar == &cv_dummyprofileautoroulette && + // Turning Auto Roulette on + cv_dummyprofileautoroulette.value == 1 && + // Not setting to default (ie changing the value) + choice != -1) + { + M_StartMessage( + "Turning on Auto Roulette", + "\"Ring Racers\" is not designed with random items in mind. With Auto Roulette, you cannot select the item results you want." + "\n" + "You will be at a distinct \x85" "disadvantage. \x80\n" + "\n" + "ARE YOU SURE?", + M_ChangeCvarResponse, + MM_YESNO, + NULL, + NULL + ); + return; + } + M_ChangeCvarDirect(choice, cvar); } From 81ef7a3e1c1283e2256c2c6b0135b16a9dca9787 Mon Sep 17 00:00:00 2001 From: VelocitOni Date: Fri, 3 May 2024 20:23:00 -0400 Subject: [PATCH 2/5] Make it actually work properly Flipped 1 to 0 so it happens when you turn it ON, also extended the message --- src/k_menufunc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/k_menufunc.c b/src/k_menufunc.c index f36cfb5f9..624625dab 100644 --- a/src/k_menufunc.c +++ b/src/k_menufunc.c @@ -210,15 +210,15 @@ static void M_ChangeCvar(INT32 choice) } #endif -if (cvar == &cv_dummyprofileautoroulette && + if (cvar == &cv_dummyprofileautoroulette && // Turning Auto Roulette on - cv_dummyprofileautoroulette.value == 1 && + cv_dummyprofileautoroulette.value == 0 && // Not setting to default (ie changing the value) choice != -1) { M_StartMessage( "Turning on Auto Roulette", - "\"Ring Racers\" is not designed with random items in mind. With Auto Roulette, you cannot select the item results you want." + "\"Ring Racers\" is not designed with random items in mind. With Auto Roulette, you cannot select the item results you want or select an item early." "\n" "You will be at a distinct \x85" "disadvantage. \x80\n" "\n" From 020cb6c60b709de8aa247b678c97135687050981 Mon Sep 17 00:00:00 2001 From: VelocitOni Date: Fri, 3 May 2024 20:33:25 -0400 Subject: [PATCH 3/5] Turn Auto Roulette off in new versions Turns off auto roulette in profiles from internal version 2 -> 3 --- src/k_profiles.cpp | 9 +++++++++ src/k_profiles.h | 3 ++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/k_profiles.cpp b/src/k_profiles.cpp index 89354bb1c..d6109bfe5 100644 --- a/src/k_profiles.cpp +++ b/src/k_profiles.cpp @@ -518,6 +518,15 @@ void PR_LoadProfiles(void) converted = true; } + if (js.prof.version == 2) + { + // Version 2 -> 3: + // - Auto Roulette is turned off again so people have to see the warning message + newprof->autoroulette == false; + + converted = true; + } + if (converted) { CONS_Printf("Profile '%s' was converted from version %d to version %d\n", diff --git a/src/k_profiles.h b/src/k_profiles.h index 0870c5d5e..70d3abd68 100644 --- a/src/k_profiles.h +++ b/src/k_profiles.h @@ -112,8 +112,9 @@ extern "C" { // Version history: // 1 - first // 2 - litesteer is off by default, old profiles litesteer +// 3 - auto roulette is switched off again // option is reset to default -#define PROFILEVER 2 +#define PROFILEVER 3 #define MAXPROFILES 16 #define PROFILESFILE "ringprofiles.prf" #define PROFILE_GUEST 0 From 544125bb994735eb9af9a21e97085fdaa4829bb1 Mon Sep 17 00:00:00 2001 From: VelocitOni Date: Fri, 3 May 2024 20:43:24 -0400 Subject: [PATCH 4/5] Make it actually build Oops, extra "." in version check and used comparison instead of "=" --- src/k_profiles.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/k_profiles.cpp b/src/k_profiles.cpp index d6109bfe5..a421a692c 100644 --- a/src/k_profiles.cpp +++ b/src/k_profiles.cpp @@ -518,11 +518,11 @@ void PR_LoadProfiles(void) converted = true; } - if (js.prof.version == 2) + if (jsprof.version == 2) { // Version 2 -> 3: // - Auto Roulette is turned off again so people have to see the warning message - newprof->autoroulette == false; + newprof->autoroulette = false; converted = true; } From 1d596ac6a548e479b9d434218bce03584e99063f Mon Sep 17 00:00:00 2001 From: VelocitOni Date: Sat, 4 May 2024 00:55:02 -0400 Subject: [PATCH 5/5] Changed == 2 to < 3 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @jartha ยท 25 minutes ago Should be jsprof.version < 3 to upgrade 2.0 profiles too. --- src/k_profiles.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/k_profiles.cpp b/src/k_profiles.cpp index a421a692c..1076cfc78 100644 --- a/src/k_profiles.cpp +++ b/src/k_profiles.cpp @@ -518,7 +518,7 @@ void PR_LoadProfiles(void) converted = true; } - if (jsprof.version == 2) + if (jsprof.version < 3) { // Version 2 -> 3: // - Auto Roulette is turned off again so people have to see the warning message