From 3b3339223241f2d4c4848b1b9db916372d2aea42 Mon Sep 17 00:00:00 2001 From: Killswitch Date: Sat, 30 Apr 2016 17:03:41 +0200 Subject: [PATCH] Fix keybinding map diary display The CBA->Keybinding diary entry would show the key bindings for all mods that a player has ever loaded/configured. Instead, CBA should only show the keybinds for mods that are actually loaded. --- addons/help/XEH_postClientInit.sqf | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/addons/help/XEH_postClientInit.sqf b/addons/help/XEH_postClientInit.sqf index 615c2298d1..fdb497a314 100644 --- a/addons/help/XEH_postClientInit.sqf +++ b/addons/help/XEH_postClientInit.sqf @@ -62,14 +62,13 @@ private _fnc_getKeyName = { _fnc_getKeyName spawn { private _text = GVAR(keys); - cba_keybinding_handlers params [["_keyNames", [], [[]]], ["_keyHandlers", [], [[]]]]; + cba_keybinding_handlers params [["_modNames", [], [[]]], ["_keyHandlers", [], [[]]]]; { - private _keyName = _x; + private _modName = _x; private _keyHandler = _keyHandlers param [_forEachIndex, []]; - - if (!isNil "_keyName") then { - _text = _text + format ["%1:
", _keyName]; + if (!isNil "_modName" && _modName in cba_keybinding_activeMods) then { + _text = _text + format ["%1:
", _modName]; _keyHandler params [["_actionNames", [], [[]]], ["_actionEntries", [], [[]]]]; @@ -95,7 +94,7 @@ _fnc_getKeyName spawn { _text = _text + "
"; }; - } forEach _keyNames; + } forEach _modNames; player createDiaryRecord ["CBA_docs", [localize "STR_DN_CBA_HELP_KEYS", _text]]; };