Skip to content

Commit

Permalink
add description.ext entry to enable debug console in SP (#843)
Browse files Browse the repository at this point in the history
* add description.ext entry to enable debug console in SP

* fix a functions header (#845)

* emulate LOCAL EXEC key in MP when pressing Enter (#846)
  • Loading branch information
commy2 authored Dec 22, 2017
1 parent feaf8be commit 124140c
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 3 deletions.
16 changes: 15 additions & 1 deletion addons/diagnostic/fnc_initExtendedDebugConsole.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions addons/diagnostic/fnc_isDebugConsoleAllowed.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
4 changes: 2 additions & 2 deletions addons/diagnostic/fnc_removeUnitTrackProjectiles.sqf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* ----------------------------------------------------------------------------
Function: CBA_removeUnitTrackProjectiles
Function: CBA_fnc_removeUnitTrackProjectiles
Description:
Removes projectile tracking from a given unit or vehicle.
Expand All @@ -12,7 +12,7 @@ Returns:
Examples:
(begin example)
[vehicle player] call CBA_removeUnitTrackProjectiles;
[vehicle player] call CBA_fnc_removeUnitTrackProjectiles;
(end)
Author:
Expand Down

0 comments on commit 124140c

Please sign in to comment.