From 26f46ab8e736f367ab345883610508b4f57b5d8b Mon Sep 17 00:00:00 2001 From: commy2 Date: Fri, 22 Dec 2017 11:19:52 +0100 Subject: [PATCH 1/3] add description.ext entry to enable debug console in SP --- addons/diagnostic/fnc_isDebugConsoleAllowed.sqf | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/diagnostic/fnc_isDebugConsoleAllowed.sqf b/addons/diagnostic/fnc_isDebugConsoleAllowed.sqf index e2bcfdd46..76601b29f 100644 --- a/addons/diagnostic/fnc_isDebugConsoleAllowed.sqf +++ b/addons/diagnostic/fnc_isDebugConsoleAllowed.sqf @@ -2,6 +2,7 @@ // enable debug console in virtual arsenal if (str missionConfigFile == "A3\Missions_F_Bootcamp\Scenarios\Arsenal.VR\description.ext") exitWith {true}; +if (!isMultiplayer && {getNumber (missionConfigFile >> "enableDebugConsoleSP") == 1}) exitWith {true}; call { #include "\a3\functions_f\Debug\fn_isDebugConsoleAllowed.sqf"; From f2beee73dcc6543a08f83d86fee158dfb2de70e9 Mon Sep 17 00:00:00 2001 From: commy2 Date: Fri, 22 Dec 2017 15:40:22 +0100 Subject: [PATCH 2/3] fix a functions header (#845) --- addons/diagnostic/fnc_removeUnitTrackProjectiles.sqf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/diagnostic/fnc_removeUnitTrackProjectiles.sqf b/addons/diagnostic/fnc_removeUnitTrackProjectiles.sqf index 27aba7b4f..9c2e648a5 100644 --- a/addons/diagnostic/fnc_removeUnitTrackProjectiles.sqf +++ b/addons/diagnostic/fnc_removeUnitTrackProjectiles.sqf @@ -1,5 +1,5 @@ /* ---------------------------------------------------------------------------- -Function: CBA_removeUnitTrackProjectiles +Function: CBA_fnc_removeUnitTrackProjectiles Description: Removes projectile tracking from a given unit or vehicle. @@ -12,7 +12,7 @@ Returns: Examples: (begin example) - [vehicle player] call CBA_removeUnitTrackProjectiles; + [vehicle player] call CBA_fnc_removeUnitTrackProjectiles; (end) Author: From 68c96d048d8dec27545a0b86a8ba800d7fcf20c4 Mon Sep 17 00:00:00 2001 From: commy2 Date: Fri, 22 Dec 2017 17:37:07 +0100 Subject: [PATCH 3/3] emulate LOCAL EXEC key in MP when pressing Enter (#846) --- .../diagnostic/fnc_initExtendedDebugConsole.sqf | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/addons/diagnostic/fnc_initExtendedDebugConsole.sqf b/addons/diagnostic/fnc_initExtendedDebugConsole.sqf index 2fb0a3b3a..dacc872ea 100644 --- a/addons/diagnostic/fnc_initExtendedDebugConsole.sqf +++ b/addons/diagnostic/fnc_initExtendedDebugConsole.sqf @@ -44,9 +44,23 @@ _expression ctrlCommit 0; // Save expression when hitting enter key inside expression text field _expression ctrlAddEventHandler ["KeyDown", { - params ["", "_key", "_shift"]; + params ["_expression", "_key", "_shift"]; if (_key in [DIK_RETURN, DIK_NUMPADENTER] && {!_shift}) then { // shift + enter is newline + // fix for enter key not working in MP + private _buttonLocalExec = ctrlParentControlsGroup _expression controlsGroupCtrl IDC_RSCDEBUGCONSOLE_BUTTONEXECUTELOCAL; + + if (isMultiplayer && {ctrlEnabled _buttonLocalExec}) then { + [ + "executeButton", + [ctrlParent _buttonLocalExec, _buttonLocalExec], + "RscDisplayDebugPublic", + 0 + ] call compile preprocessFileLineNumbers "\A3\Ui_f\scripts\GUI\RscDebugConsole.sqf"; + + playSound "SoundClick"; + }; + _this call FUNC(logStatement); }; false