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

View file

@ -723,7 +723,13 @@ void C_SetDefaultKeys(const char* baseconfig)
lastlump = 0;
while ((lump = fileSystem.FindLump("DEFBINDS", &lastlump)) != -1)
{
ReadBindings(lump, false);
// [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);
else
ReadBindings(lump, true);
}
}