diff --git a/src/d_netcmd.c b/src/d_netcmd.c index 67f8c3a2..1c90d181 100644 --- a/src/d_netcmd.c +++ b/src/d_netcmd.c @@ -4910,10 +4910,10 @@ static void Fishcake_OnChange(void) */ static void Command_Isgamemodified_f(void) { - if (savemoddata) - CONS_Printf("The game has been modified with an add-on with its own save data, so you can play Record Attack and earn medals.\n"); - else if (majormods) + if (majormods) CONS_Printf("The game has been modified with major add-ons, so you cannot play Record Attack.\n"); + else if (savemoddata) + CONS_Printf("The game has been modified with an add-on 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 add-ons. You can play Record Attack, earn medals and unlock extras.\n"); else diff --git a/src/g_game.c b/src/g_game.c index 1e0744f4..8dffb7d5 100644 --- a/src/g_game.c +++ b/src/g_game.c @@ -764,7 +764,7 @@ void G_SetGameModified(boolean silent, boolean major) if (!major) return; - savemoddata = false; + //savemoddata = false; -- there is literally no reason to do this anymore. majormods = true; if (!silent) @@ -3933,7 +3933,6 @@ void G_LoadGameData(void) // Saves the main data file, which stores information such as emblems found, etc. void G_SaveGameData(boolean force) { - const boolean wasmodified = modifiedgame; size_t length; INT32 i, j; UINT8 btemp; @@ -3950,9 +3949,7 @@ void G_SaveGameData(boolean force) return; } - if (force) // SRB2Kart: for enabling unlocks online, even if the game is modified - modifiedgame = savemoddata; // L-let's just sort of... hack around the cheat protection, because I'm too worried about just removing it @@; - else if (modifiedgame && !savemoddata) + if (majormods && !force) { free(savebuffer); save_p = savebuffer = NULL; @@ -3965,7 +3962,7 @@ void G_SaveGameData(boolean force) WRITEUINT32(save_p, totalplaytime); WRITEUINT32(save_p, matchesplayed); - btemp = (UINT8)(savemoddata || modifiedgame); + btemp = (UINT8)(savemoddata); // what used to be here was profoundly dunderheaded WRITEUINT8(save_p, btemp); // TODO put another cipher on these things? meh, I don't care... @@ -4051,9 +4048,6 @@ void G_SaveGameData(boolean force) FIL_WriteFile(va(pandf, srb2home, gamedatafilename), savebuffer, length); free(savebuffer); save_p = savebuffer = NULL; - - if (force) // Eeeek, I'm sorry for my sins! - modifiedgame = wasmodified; } #define VERSIONSIZE 16 @@ -5925,6 +5919,19 @@ void G_DoPlayDemo(char *defdemoname) return; } + // ...*map* not loaded? + if (!gamemap || (gamemap > NUMMAPS) || !mapheaderinfo[gamemap-1] || !(mapheaderinfo[gamemap-1]->menuflags & LF2_EXISTSHACK)) + { + snprintf(msg, 1024, M_GetText("%s features a course that is not currently loaded.\n"), pdemoname); + CONS_Alert(CONS_ERROR, "%s", msg); + M_StartMessage(msg, NULL, MM_NOTHING); + Z_Free(pdemoname); + Z_Free(demobuffer); + demoplayback = false; + titledemo = false; + return; + } + Z_Free(pdemoname); memset(&oldcmd,0,sizeof(oldcmd)); diff --git a/src/m_menu.c b/src/m_menu.c index 2ea7234c..9e51cb50 100644 --- a/src/m_menu.c +++ b/src/m_menu.c @@ -4543,7 +4543,10 @@ static boolean M_AddonsRefresh(void) if ((refreshdirmenu & REFRESHDIR_NORMAL) && !preparefilemenu(true)) { UNEXIST; - CLEARNAME; + if (refreshdirname) + { + CLEARNAME; + } return true; } @@ -4723,7 +4726,7 @@ static void M_DrawAddons(void) V_DrawSmallScaledPatch(x, y + 4, (menusearch[0] ? 0 : V_TRANSLUCENT), addonsp[NUM_EXT+3]); x = BASEVIDWIDTH - x - 16; - V_DrawSmallScaledPatch(x, y + 4, ((!modifiedgame || savemoddata) ? 0 : V_TRANSLUCENT), addonsp[NUM_EXT+4]); + V_DrawSmallScaledPatch(x, y + 4, ((!majormods) ? 0 : V_TRANSLUCENT), addonsp[NUM_EXT+4]); if (modifiedgame) V_DrawSmallScaledPatch(x, y + 4, 0, addonsp[NUM_EXT+2]);