Fix addons with custom gamedata not loading
Fixes #473 (closed).
When testing an addon with custom gamedata via ZB or loading it via the command line,
G_LoadGameData fails at the very first gamedata check, which is
if ((modded && !savemoddata)). This merge request makes
W_InitFile only set
modifiedgame directly, instead of calling
G_SetGameModified which also sets
savemoddata to be false.
While I didn't encounter any issues with this change after several tests, I'm not 100% sure if this fix has any unwanted side effects, so please review and test this branch thoroughly.
changed the descriptionToggle commit list
You know, seeing the code here now... it does make me wonder why
G_SetGameModifiedwas being set after all the SOC lumps have been loaded. That just means even if the gamedata file was loaded and
savemoddataset to true, it would override that and set it back to false again. No wonder the bug was happening at all!
Closing this because it introduces new problems.
closedToggle commit list
I also realise my comment is wrong, I got the
ResourceFileDetectline mixed up with the actual Lua/SOC loading lines a bit later in
Though to clarify sphere's comment, it turns out loading a mod with a gamedata then a mod without doesn't disable saving if done through command line with this fix. But why it does I'm not entirely sure yet atm.
Okay, turns out that last issue actually occurs in 2.2.8 as well, so it's not a new problem at all. I'm reopening this MR in that case.
reopenedToggle commit list
mergedToggle commit list