From 4ac136f6269ceb90c37c494dd971aca3f294546d Mon Sep 17 00:00:00 2001 From: James R Date: Sat, 5 Oct 2019 13:15:36 -0700 Subject: [PATCH 1/2] Custom gamedata parameter --- src/g_game.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/g_game.c b/src/g_game.c index e2f43e4f2..519c934a3 100644 --- a/src/g_game.c +++ b/src/g_game.c @@ -3361,6 +3361,11 @@ void G_LoadGameData(void) if (M_CheckParm("-resetdata")) return; // Don't load (essentially, reset). + if (M_CheckParm("-gamedata") && M_IsNextParm()) + { + strlcpy(gamedatafilename, M_GetNextParm(), sizeof gamedatafilename); + } + length = FIL_ReadFile(va(pandf, srb2home, gamedatafilename), &savebuffer); if (!length) // Aw, no game data. Their loss! return; From 2078b47952b83bfa69750ae388766c088ca5f73e Mon Sep 17 00:00:00 2001 From: James R Date: Sun, 27 Oct 2019 10:33:40 -0700 Subject: [PATCH 2/2] Move gamedata param to cover -resetdata --- src/g_game.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/g_game.c b/src/g_game.c index 519c934a3..5a619f945 100644 --- a/src/g_game.c +++ b/src/g_game.c @@ -3358,14 +3358,14 @@ void G_LoadGameData(void) // Allow saving of gamedata beyond this point gamedataloaded = true; - if (M_CheckParm("-resetdata")) - return; // Don't load (essentially, reset). - if (M_CheckParm("-gamedata") && M_IsNextParm()) { strlcpy(gamedatafilename, M_GetNextParm(), sizeof gamedatafilename); } + if (M_CheckParm("-resetdata")) + return; // Don't load (essentially, reset). + length = FIL_ReadFile(va(pandf, srb2home, gamedatafilename), &savebuffer); if (!length) // Aw, no game data. Their loss! return;