engine: client: add double quotes around key in bind command in config file. Thanks @TheKingFireS for fix

This commit is contained in:
Alibek Omarov
2026-02-20 23:14:27 +05:00
parent 2735add7d0
commit b2911e6d96

View File

@@ -462,7 +462,12 @@ void Key_WriteBindings( file_t *f )
continue;
Cmd_Escape( newCommand, keys[i].binding, sizeof( newCommand ));
FS_Printf( f, "bind %s \"%s\"\n", Key_KeynumToString( i ), newCommand );
// NOTE: as TheKingFireS figured out, some particular mods (like CoF) do not
// use LookupBinding to find key by it's binding and instead parse config.cfg
// to look for bind commands.
// CoF expects key to be enclosed in double quotes
FS_Printf( f, "bind \"%s\" \"%s\"\n", Key_KeynumToString( i ), newCommand );
}
}