ACE3/addons/map_gestures/XEH_postInit.sqf
PabstMirror aeb0614e7e Cleanup map gesture sync / color mapping (#4486)
* Cleanup map gesture sync / color mapping

- Adds ace_common_fnc_setPlayerOwner which syncs player's owner var
- Redo publicVarClient with CBA's ownerEvent
- Remove old ace_settings
- Make color module run globaly
- Ad public ace_map_gestures_fnc_addGroupColorMapping

* fix return
2016-10-27 19:54:58 +02:00

33 lines
919 B
Plaintext

#include "script_component.hpp"
if (["STMapGestures"] call EFUNC(common,isModLoaded)) exitWith {
WARNING("st_map_gestures is installed - exiting [remove st_map_gestures.pbo to allow ace version]");
};
if (!hasInterface) exitWith {};
["ace_settingsInitialized", {
if (!GVAR(enabled)) exitWith {};
// This will set QEGVAR(common,playerOwner) var on player objects
[] call EFUNC(common,setPlayerOwner);
GVAR(pointPosition) = [0,0,0];
[QGVAR(syncPos), {
params ["_unit", "_pointPos"];
_unit setVariable [QGVAR(pointPosition), _pointPos];
}] call CBA_fnc_addEventHandler;
[{
if (isNull (findDisplay 12)) exitWith {};
params ["", "_pfhId"];
call FUNC(receiverInit);
call FUNC(transmitterInit);
[_pfhId] call CBA_fnc_removePerFrameHandler;
}, 1, []] call CBA_fnc_addPerFrameHandler;
}] call CBA_fnc_addEventHandler;