A much smarter DEFBINDS fix. Check if the lump is in the range of an IWAD, if so, override the settings... if not, don't override the settings.

https://forum.zdoom.org/viewtopic.php?f=2&t=68292
This commit is contained in:
SanyaWaffles 2020-04-24 03:38:52 -04:00 committed by Christoph Oelckers
parent 1cf8c2f63e
commit 6a604f35cb
1 changed files with 7 additions and 1 deletions

View File

@ -723,7 +723,13 @@ void C_SetDefaultKeys(const char* baseconfig)
lastlump = 0; lastlump = 0;
while ((lump = fileSystem.FindLump("DEFBINDS", &lastlump)) != -1) while ((lump = fileSystem.FindLump("DEFBINDS", &lastlump)) != -1)
{ {
// [SW] - We need to check to see the origin of the DEFBINDS... if it
// Comes from an IWAD/IPK3/IPK7 allow it to override the users settings...
// If it comes from a user mod however, don't.
if (fileSystem.GetFileContainer(lump) > fileSystem.GetMaxIwadNum())
ReadBindings(lump, false); ReadBindings(lump, false);
else
ReadBindings(lump, true);
} }
} }