From 6a604f35cb38738df5b7d2c02a8f9ce91576a6b0 Mon Sep 17 00:00:00 2001 From: SanyaWaffles Date: Fri, 24 Apr 2020 03:38:52 -0400 Subject: [PATCH] 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 --- src/common/console/c_bind.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/common/console/c_bind.cpp b/src/common/console/c_bind.cpp index d941008db..d80447475 100644 --- a/src/common/console/c_bind.cpp +++ b/src/common/console/c_bind.cpp @@ -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); } }