- Backend update from Raze.
* TArray extensions * MSVC setup so that [[deprecated]] emits warnings.
This commit is contained in:
parent
3cce406bd5
commit
c598d9bab7
20 changed files with 348 additions and 29 deletions
|
|
@ -686,6 +686,17 @@ void ReadBindings(int lump, bool override)
|
|||
FKeyBindings* dest = &Bindings;
|
||||
int key;
|
||||
|
||||
if (sc.Compare("unbind"))
|
||||
{
|
||||
sc.MustGetString();
|
||||
if (override)
|
||||
{
|
||||
// This is only for games to clear unsuitable base defaults, not for mods.
|
||||
dest->UnbindKey(sc.String);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
// bind destination is optional and is the same as the console command
|
||||
if (sc.Compare("bind"))
|
||||
{
|
||||
|
|
@ -722,7 +733,18 @@ void ReadBindings(int lump, bool override)
|
|||
void C_SetDefaultKeys(const char* baseconfig)
|
||||
{
|
||||
auto lump = fileSystem.CheckNumForFullName("engine/commonbinds.txt");
|
||||
if (lump >= 0) ReadBindings(lump, true);
|
||||
if (lump >= 0)
|
||||
{
|
||||
// Bail out if a mod tries to override this. Main game resources are allowed to do this, though.
|
||||
auto fileno2 = fileSystem.GetFileContainer(lump);
|
||||
if (fileno2 > fileSystem.GetMaxIwadNum())
|
||||
{
|
||||
I_FatalError("File %s is overriding core lump %s.",
|
||||
fileSystem.GetResourceFileFullName(fileno2), "engine/commonbinds.txt");
|
||||
}
|
||||
|
||||
ReadBindings(lump, true);
|
||||
}
|
||||
int lastlump = 0;
|
||||
|
||||
while ((lump = fileSystem.FindLumpFullName(baseconfig, &lastlump)) != -1)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue