Minor cleanup

This commit is contained in:
PabstMirror 2017-03-25 11:36:37 -05:00
parent 80d7ef5b67
commit 690e415ffe
3 changed files with 14 additions and 9 deletions

View File

@ -1,6 +1,7 @@
// #define DEBUG_MODE_FULL
#include "script_component.hpp"
["ace_interactMenuClosed", {[objNull, 0] call FUNC(displayPatientInformation); }] call CBA_fnc_addEventHandler;
["ace_interactMenuClosed", {[objNull, 0] call FUNC(displayPatientInformation);}] call CBA_fnc_addEventHandler;
//Handle Deleting Bodies and creating litter on Server:
if (isServer) then {
@ -32,7 +33,11 @@ if (!hasInterface) exitWith {};
}] call EFUNC(common,arithmeticSetSource);
#ifdef DEBUG_MODE_FULL
if (hasInterface) then {
[{!isNull findDisplay 46}, {
INFO("Creating Debug Display");
if (!isNull (uiNamespace getVariable [QGVAR(debugControl), controlNull])) then {
ctrlDelete (uiNamespace getVariable [QGVAR(debugControl), controlNull]); // cleanup on SP Restart
};
private _ctrl = findDisplay 46 ctrlCreate ["RscText", -1];
_ctrl ctrlSetPosition [
safeZoneX,
@ -51,8 +56,8 @@ if (!hasInterface) exitWith {};
if (!isNull cursorTarget && {cursorTarget isKindOf "CAManBase"}) then {
private _targetState = [cursorTarget, GVAR(STATE_MACHINE)] call CBA_statemachine_fnc_getCurrentState;
drawIcon3D ["", [0.6, 0, 0, 1], cursorTarget modelToWorld (cursorTarget selectionPosition "pelvis"), 0, 0, 0, format ["State: %1", _targetState], 2, 40 * pixelH, "RobotoCondensed"];
drawIcon3D ["", [0.6, 0, 0, 1], cursorTarget modelToWorldVisual (cursorTarget selectionPosition "pelvis"), 0, 0, 0, format ["State: %1", _targetState], 2, 40 * pixelH, "RobotoCondensed"];
};
}] call CBA_fnc_addPerFrameHandler;
};
}, 0 ,[]] call CBA_fnc_addPerFrameHandler;
}, []] call CBA_fnc_waitUntilAndExecute;
#endif

View File

@ -78,5 +78,6 @@ _unit setVariable [QGVAR(allLogs), [], true];
[{
params ["_unit"];
TRACE_2("Unit Init",_unit,local _unit);
[QGVAR(initialized), [_unit]] call CBA_fnc_localEvent;
}, [_unit], 0.5, 0.1] call CBA_fnc_waitAndExecute;
}, [_unit], 0.5] call CBA_fnc_waitAndExecute;

View File

@ -1,7 +1,8 @@
#include "script_component.hpp"
[QEGVAR(medical,initialized), FUNC(checkItems)] call CBA_fnc_addEventHandler;
["loadout", FUNC(checkItems)] call CBA_fnc_addPlayerEventHandler;
if (isServer) then {
[QGVAR(createLitterServer), FUNC(litterHandleCreate)] call CBA_fnc_addEventHandler;
@ -20,5 +21,3 @@ if (isServer) then {
[QGVAR(actionCheckPulseLocal), FUNC(actionCheckPulseLocal)] call CBA_fnc_addEventHandler;
[QGVAR(actionCheckBloodPressureLocal), FUNC(actionCheckBloodPressureLocal)] call CBA_fnc_addEventHandler;
[QGVAR(actionPlaceInBodyBag), FUNC(actionPlaceInBodyBag)] call CBA_fnc_addEventHandler;
["loadout", FUNC(checkItems)] call CBA_fnc_addPlayerEventHandler;