remove "majormods" checks from stuff that saves to savegame

so its only there to throw a notice when you load an addon
This commit is contained in:
Alug committed 2025-01-13 16:44:04 +01:00
1 parent 591a2e5dbb
commit bb7c217ccc
6 files changed
+9 -32

No files matched your search

+2 -6
View File
@@ -5801,12 +5801,8 @@ static void Fishcake_OnChange(void)
*/
static void Command_Isgamemodified_f(void)
{
if (majormods)
CONS_Printf("The game has been modified with major addons, so you cannot play Record Attack.\n");
else if (savemoddata)
CONS_Printf("The game has been modified with an addon with its own save data, so you can play Record Attack and earn medals.\n");
else if (modifiedgame)
CONS_Printf("The game has been modified with only minor addons. You can play Record Attack, earn medals and unlock extras.\n");
if (majormods || modifiedgame)
CONS_Printf("The game has been modified, Record Attack data will be saved to a seperate savegame.\n");
else
CONS_Printf("The game has not been modified. You can play Record Attack, earn medals and unlock extras.\n");
}
+3 -9
View File
@@ -599,13 +599,12 @@ tic_t G_GetBestTime(INT16 map)
return mainrecords[map-1]->time;
}
// hack t
// kinda hacky way to do this, but this sets the game to use a seperate savefile if you have addons loaded
static void G_SetSaveGameModified(void)
{
size_t filenamelen;
savemoddata = true;
majormods = false; // FIXME: this breaks the menu warning screen from popping up, id still want to use it to mention the diff savefile
strlcpy(gamedatafilename, "modkartdata.dat", sizeof (gamedatafilename));
strlwr(gamedatafilename);
@@ -638,6 +637,7 @@ void G_SetGameModified(boolean silent, boolean major)
//savemoddata = false; -- there is literally no reason to do this anymore.
majormods = true;
// should this only be done when you load a "major" gameplay modifieng addon?
G_SetSaveGameModified();
if (!silent)
@@ -3635,6 +3635,7 @@ void G_SaveGameData(boolean force)
INT32 i, j;
UINT8 btemp;
savebuffer_t save;
(void)force;
if (!gamedataloaded)
return; // If never loaded (-nodata), don't save
@@ -3646,13 +3647,6 @@ void G_SaveGameData(boolean force)
return;
}
if (majormods && !force)
{
free(save.buffer);
save.p = save.buffer = NULL;
return;
}
// Version test
WRITEUINT32(save.p, 0xFCAFE211);
+1 -3
View File
@@ -385,9 +385,7 @@ UINT8 M_UpdateUnlockablesAndExtraEmblems(boolean force)
INT32 i;
char cechoText[992] = "";
UINT8 cechoLines = 0;
if (majormods && !force) // SRB2Kart: for enabling unlocks online in modified servers
return false;
(void)force;
M_CheckUnlockConditions();
-11
View File
@@ -4100,17 +4100,6 @@ boolean M_Responder(event_t *ev)
if (routine)
{
if (((currentMenu->menuitems[itemOn].status & IT_TYPE)==IT_CALL
|| (currentMenu->menuitems[itemOn].status & IT_TYPE)==IT_SUBMENU)
&& (currentMenu->menuitems[itemOn].status & IT_CALLTYPE))
{
if (((currentMenu->menuitems[itemOn].status & IT_CALLTYPE) & IT_CALL_NOTMODIFIED) && majormods)
{
S_StartSound(NULL, sfx_menu1);
M_StartMessage(M_GetText("This cannot be done with complex addons\nor in a cheated game.\n\n(Press a key)\n"), NULL, MM_NOTHING);
return true;
}
}
S_StartSound(NULL, sfx_menu1);
switch (currentMenu->menuitems[itemOn].status & IT_TYPE)
{
+2 -2
View File
@@ -988,7 +988,7 @@ static inline void P_SpawnEmblems(void)
static void P_SpawnSecretItems(boolean loademblems)
{
// Now let's spawn those funky emblem things! Tails 12-08-2002
if (netgame || multiplayer || majormods) // No cheating!!
if (netgame || multiplayer) // No cheating!!
return;
if (loademblems)
@@ -2976,7 +2976,7 @@ boolean P_SetupLevel(boolean skipprecip, boolean reloadinggamestate)
nextmapoverride = 0;
skipstats = false;
if (!(netgame || multiplayer) && !majormods)
if (!(netgame || multiplayer))
mapvisited[gamemap-1] |= MV_VISITED;
levelloading = false;
+1 -1
View File
@@ -844,7 +844,7 @@ void Y_StartIntermission(void)
}
case int_race: // (time-only race)
{
if (!majormods && !multiplayer && !demo.playback) // remove this once we have a proper time attack screen
if (!multiplayer && !demo.playback) // remove this once we have a proper time attack screen
{
// Update visitation flags
mapvisited[gamemap-1] |= MV_BEATEN;