diff --git a/addons/markinglaser/XEH_PREP.hpp b/addons/markinglaser/XEH_PREP.hpp index 528db309af0..b5aed75c2d7 100644 --- a/addons/markinglaser/XEH_PREP.hpp +++ b/addons/markinglaser/XEH_PREP.hpp @@ -1,8 +1,4 @@ PREP(findTurret); -PREP(getPilotCamVector); -PREP(getTurretVector); PREP(onAircraftInit); -PREP(onLaserOff); PREP(onLaserOn); PREP(renderPFH); -PREP(updatePFH); diff --git a/addons/markinglaser/XEH_postInit.sqf b/addons/markinglaser/XEH_postInit.sqf index ad7a1aed349..ff9a301d01f 100644 --- a/addons/markinglaser/XEH_postInit.sqf +++ b/addons/markinglaser/XEH_postInit.sqf @@ -1,45 +1,41 @@ #include "script_component.hpp" #include "\a3\ui_f\hpp\defineDIKCodes.inc" -// Events -[QGVAR(laserOn), LINKFUNC(onLaserOn)] call CBA_fnc_addEventHandler; -[QGVAR(laserOff), LINKFUNC(onLaserOff)] call CBA_fnc_addEventHandler; +if (!hasInterface) exitWith {}; // Keybinds ["ACE3 Vehicles", QGVAR(toggleLaser), LLSTRING(ToggleLaser), { // Ignore when in Zeus - if (!isNull curatorCamera) exitWith {}; + if (!isNull curatorCamera) exitWith {false}; private _vehicle = cameraOn; if !(_vehicle getVariable [QGVAR(enabled), false]) exitWith {false}; private _controlledUnit = [ACE_player, ACE_controlledUAV # 1] select (unitIsUAV _vehicle); - private _canTurnOn = if (_vehicle getVariable [QGVAR(useTurret), false]) then { - private _turretInfo = _vehicle getVariable [QGVAR(turretInfo), []]; - _controlledUnit == _vehicle turretUnit _turretInfo # 0 - } else { - _controlledUnit == driver _vehicle - }; - - if (_canTurnOn) then { - if (_vehicle getVariable [QGVAR(laserOn), false]) then { - [QGVAR(laserOff), [_vehicle]] call CBA_fnc_globalEvent; - } else { - [QGVAR(laserOn), [_vehicle]] call CBA_fnc_globalEvent; - }; - - true - } else { - false - }; -}, "", [DIK_L, [false, false, true]]] call CBA_fnc_addKeybind; - -// JIP init -if (didJIP) then { - { - if (_x getVariable [QGVAR(laserOn), false]) then { - [_x] call FUNC(onLaserOn); - }; - } forEach (allMissionObjects "Air"); -}; + private _turretInfo = _vehicle getVariable [QGVAR(turretInfo), []]; + private _canTurnOn = _controlledUnit == _vehicle turretUnit _turretInfo; + if (!_canTurnOn) exitWith { false }; + + playSound "ACE_Sound_Click"; + private _currentMode = _vehicle getVariable [QGVAR(laserMode), MODE_OFF]; + private _newMode = (_currentMode + 1) % 3; + _vehicle setVariable [QGVAR(laserMode), _newMode, true]; + true +}, "", [DIK_L, [false, false, true]]] call CBA_fnc_addKeybind; // ALT-L + +["CBA_settingsInitialized", { + TRACE_1("settingsInitialized",1); + + GVAR(pfEH) = -1; + ["visionMode", LINKFUNC(onLaserOn), true] call CBA_fnc_addPlayerEventHandler; + ["ace_laserOn", { + params ["", "_args"]; + _args params ["_object"]; + if !(_object getVariable [QGVAR(enabled), false]) exitWith {}; + _object setVariable [QGVAR(smoothing), []]; + _object setVariable [QGVAR(flashOffset), random 1]; // make flashes not syncronized + + [] call LINKFUNC(onLaserOn); + }] call CBA_fnc_addEventHandler; +}] call CBA_fnc_addEventHandler; diff --git a/addons/markinglaser/XEH_preInit.sqf b/addons/markinglaser/XEH_preInit.sqf index 12c8e370b31..894773534a4 100644 --- a/addons/markinglaser/XEH_preInit.sqf +++ b/addons/markinglaser/XEH_preInit.sqf @@ -8,9 +8,4 @@ PREP_RECOMPILE_END; #include "initSettings.inc.sqf" -GVAR(lasers) = []; -GVAR(localLasers) = []; -GVAR(renderPFH) = -1; -GVAR(updatePFH) = -1; - ADDON = true; diff --git a/addons/markinglaser/functions/fnc_findTurret.sqf b/addons/markinglaser/functions/fnc_findTurret.sqf index b92fdbd2254..19b3f36fa3d 100644 --- a/addons/markinglaser/functions/fnc_findTurret.sqf +++ b/addons/markinglaser/functions/fnc_findTurret.sqf @@ -7,7 +7,7 @@ * 0: Aircraft config * * Return Value: - * None + * * * Example: * [configOf _plane] call ace_markinglaser_fnc_findTurret diff --git a/addons/markinglaser/functions/fnc_getPilotCamVector.sqf b/addons/markinglaser/functions/fnc_getPilotCamVector.sqf deleted file mode 100644 index 6b57f1fbd4f..00000000000 --- a/addons/markinglaser/functions/fnc_getPilotCamVector.sqf +++ /dev/null @@ -1,81 +0,0 @@ -#include "..\script_component.hpp" -/* - * Author: BaerMitUmlaut - * Calculates the directional vector of a pilot camera mounted marking laser. - * Uses interpolation of regular network updates because camera direction is local. - * - * Arguments: - * 0: Aircraft - * 1: Laser - * - * Return Value: - * Directional vector of laser in world space - * - * Example: - * [plane, laser] call ace_markinglaser_fnc_getPilotCamVector - * - * Public: No - */ - -params ["_aircraft"]; - -#ifndef DEBUG_MODE_FULL -// If player is controlling the camera, no need to interpolate -// Interpolate local AI vehicles, getPilotCameraDirection does not work with AI -if (local _aircraft && {cameraOn == _aircraft}) exitWith { - _aircraft vectorModelToWorldVisual getPilotCameraDirection _aircraft -}; -#endif - -// _type - Target type -// _target - Locked target, either an object, a position or a vector -// _time - When this info was last synched -// _isNewInfo - NIL when this info was just updated, otherwise true (not synched) -private _laser = _aircraft getVariable [QGVAR(laserInfo), []]; -_laser params ["_type", "_target", "_time", ["_isNewInfo", true]]; - -private _originModel = _aircraft getVariable [QGVAR(laserOrigin), ""]; -private _origin = _aircraft modelToWorldVisualWorld (_aircraft selectionPosition _originModel); -private _deltaTime = CBA_missionTime - _time; - -// If an update is older than 2s, the laser movement is stopped -// This would indicate a lot of lag and cause the laser to go off into nowhere -if (_deltaTime > UPDATE_INTERVAL * 2) exitWith { - _aircraft vectorModelToWorld vectorUp _laser; -}; - -private _interpolationInfo = _aircraft getVariable [QGVAR(interpolationInfo), []]; -_interpolationInfo params ["_lastTarget", "_cachedTarget", ["_cachedType", ""]]; - -// If laser info was just synched, use previous position/vector for interpolation start -if (_isNewInfo) then { - // TYPE_VECTOR doesn't clip interpolation, use current orientation instead - _cachedTarget = [_cachedTarget, _aircraft vectorWorldToModelVisual vectorUp _laser] select (_type == TYPE_VECTOR); - - // Do not interpolate if type changed - might cause a snap when locking but should be OK - _lastTarget = [_target, _cachedTarget] select (_type == _cachedType); - - // Update info arrays - _aircraft setVariable [QGVAR(interpolationInfo), [_lastTarget, _target, _type]]; -}; - -private _vector = [0, 0, 0]; -switch (_type) do { - case TYPE_OBJECT: { - // Don't interpolate because laser should always directly point at object - _vector = _origin vectorFromTo getPosASLVisual _target; - }; - case TYPE_GROUND: { - // Interpolate between last position and current position - private _interpolatedPos = vectorLinearConversion [0, UPDATE_INTERVAL, _deltaTime, _lastTarget, _target, true]; - _vector = _origin vectorFromTo _interpolatedPos; - }; - case TYPE_VECTOR: { - // Interpolate between last vector and current vector - // Interpolation is deliberately not clipped to smoothen movement with delayed updates - private _interpolatedVec = vectorLinearConversion [0, UPDATE_INTERVAL, _deltaTime, _lastTarget, _target, false]; - _vector = _aircraft vectorModelToWorldVisual _interpolatedVec; - }; -}; - -_vector diff --git a/addons/markinglaser/functions/fnc_getTurretVector.sqf b/addons/markinglaser/functions/fnc_getTurretVector.sqf deleted file mode 100644 index 27ded490ee0..00000000000 --- a/addons/markinglaser/functions/fnc_getTurretVector.sqf +++ /dev/null @@ -1,38 +0,0 @@ -#include "..\script_component.hpp" -/* - * Author: BaerMitUmlaut - * Calculates the directional vector of a turret mounted marking laser. - * - * Arguments: - * 0: Aircraft - * - * Return Value: - * Directional vector of laser in world space - * - * Example: - * [plane] call ace_markinglaser_fnc_getTurretVector - * - * Public: No - */ - -params ["_aircraft"]; - -private _turretInfo = _aircraft getVariable [QGVAR(turretInfo), []]; -_turretInfo params ["_turretPath", "_animationSources", "_followFreeLook"]; - -private _controlledTurret = if (unitIsUAV cameraOn) then { - ACE_controlledUAV # 2 -} else { - cameraOn unitTurret ACE_player -}; - -if ((cameraOn == _aircraft) && {(_followFreeLook && {cameraView == "INTERNAL"}) || {cameraView == "GUNNER"}} && {!freeLook} && {_turretPath isEqualTo _controlledTurret}) then { - // Camera has some inertia which the turret does not have, use center of screen instead - (AGLToASL positionCameraToWorld [0, 0, 0]) vectorFromTo (AGLToASL positionCameraToWorld [0, 0, 1]) -} else { - // Get turret dir through animation source - private _angleBody = -deg (_aircraft animationPhase _animationSources # 0); - private _angleGun = deg (_aircraft animationPhase _animationSources # 1); - - _aircraft vectorModelToWorld ([1, _angleBody, _angleGun] call CBA_fnc_polar2vect) -}; diff --git a/addons/markinglaser/functions/fnc_onAircraftInit.sqf b/addons/markinglaser/functions/fnc_onAircraftInit.sqf index d786c477c88..679792cd928 100644 --- a/addons/markinglaser/functions/fnc_onAircraftInit.sqf +++ b/addons/markinglaser/functions/fnc_onAircraftInit.sqf @@ -16,6 +16,7 @@ */ params ["_aircraft"]; +TRACE_2("onAircraftInit",_aircraft,typeOf _aircraft); // Assume enabled by default if !(_aircraft getVariable [QGVAR(enabled), true]) exitWith {}; @@ -30,45 +31,14 @@ if ((_turretData isEqualTo []) && {!_hasPilotCamera}) exitWith { }; _aircraft setVariable [QGVAR(enabled), true]; +_aircraft setVariable [QGVAR(smoothing), []]; if (_turretData isEqualTo []) then { + TRACE_1("pilot",_turretData); // Use pilot camera if no turrets are available - private _origin = getText (_config >> "memoryPointDriverOptics"); - - // Elevation limits are inverted, possibly because TGPs are usually mounted below the wing - private _limits = [ - getNumber (_config >> "PilotCamera" >> "minTurn"), - getNumber (_config >> "PilotCamera" >> "maxTurn"), - -getNumber (_config >> "PilotCamera" >> "maxElev"), - -getNumber (_config >> "PilotCamera" >> "minElev") - ]; - - _aircraft setVariable [QGVAR(useTurret), false]; - _aircraft setVariable [QGVAR(laserOrigin), _origin]; - _aircraft setVariable [QGVAR(gimbalLimits), _limits]; + _aircraft setVariable [QGVAR(turretInfo), [-1]]; } else { - // Use turret of copilot or primary gunner - _turretData params ["_turretPath", "_turretConfig"]; - - private _origin = getText (_turretConfig >> "memoryPointGunnerOptics"); - private _limits = [ - getNumber (_turretConfig >> "minTurn"), - getNumber (_turretConfig >> "maxTurn"), - getNumber (_turretConfig >> "minElev"), - getNumber (_turretConfig >> "maxElev") - ]; - - // Animation sources are used to detect direction of turret - private _animationSources = [ - getText (_turretConfig >> "animationSourceBody"), - getText (_turretConfig >> "animationSourceGun") - ]; - - // Some helicopter turrets follow the look direction when not in gunner view - private _followFreeLook = (getNumber (_turretConfig >> "turretFollowFreeLook")) > 0; - - _aircraft setVariable [QGVAR(useTurret), true]; - _aircraft setVariable [QGVAR(laserOrigin), _origin]; - _aircraft setVariable [QGVAR(gimbalLimits), _limits]; - _aircraft setVariable [QGVAR(turretInfo), [_turretPath, _animationSources, _followFreeLook]]; + TRACE_1("turret",_turretData); + _turretData params ["_turretPath"]; + _aircraft setVariable [QGVAR(turretInfo), _turretPath]; }; diff --git a/addons/markinglaser/functions/fnc_onLaserOff.sqf b/addons/markinglaser/functions/fnc_onLaserOff.sqf deleted file mode 100644 index 8565fa6eb7c..00000000000 --- a/addons/markinglaser/functions/fnc_onLaserOff.sqf +++ /dev/null @@ -1,29 +0,0 @@ -#include "..\script_component.hpp" -/* - * Author: BaerMitUmlaut - * Handles a plane turning its marking laser on. - * - * Arguments: - * 0: Aircraft - * - * Return Value: - * None - * - * Example: - * [plane] call ace_markinglaser_fnc_onLaserOff - * - * Public: No - */ - -params ["_aircraft"]; - -GVAR(lasers) deleteAt (GVAR(lasers) find _aircraft); -GVAR(localLasers) deleteAt (GVAR(localLasers) find _laser); - -if (local _aircraft) then { - _aircraft setVariable [QGVAR(laserOn), false, true]; -}; - -if (isServer) then { - _aircraft removeMPEventHandler ["MPKilled", _aircraft getVariable QGVAR(killedEH)]; -}; diff --git a/addons/markinglaser/functions/fnc_onLaserOn.sqf b/addons/markinglaser/functions/fnc_onLaserOn.sqf index 8a8ad2d2779..1f82f7e1b87 100644 --- a/addons/markinglaser/functions/fnc_onLaserOn.sqf +++ b/addons/markinglaser/functions/fnc_onLaserOn.sqf @@ -1,7 +1,7 @@ #include "..\script_component.hpp" /* - * Author: BaerMitUmlaut - * Handles a plane turning its marking laser off. + * Author: BaerMitUmlaut, PabstMirror + * Starts render PFEH * * Arguments: * 0: Aircraft @@ -10,37 +10,13 @@ * None * * Example: - * [plane] call ace_markinglaser_fnc_onLaserOn + * [] call ace_markinglaser_fnc_onLaserOn * * Public: No */ -params ["_aircraft"]; +if (GVAR(pfEH) != -1) exitWith {}; +if (((currentVisionMode focusOn) != 1) || {EGVAR(laser,laserEmitters) isEqualTo []}) exitWith {}; -// Start PFHs if this is the first laser -if (local _aircraft && {GVAR(updatePFH) == -1}) then { - GVAR(updatePFH) = [LINKFUNC(updatePFH), 1, []] call CBA_fnc_addPerFrameHandler; - - // Make sure update is called before first render - [] call FUNC(updatePFH); -}; - -if (hasInterface && {GVAR(renderPFH) == -1}) then { - GVAR(renderPFH) = [LINKFUNC(renderPFH), 0, []] call CBA_fnc_addPerFrameHandler; -}; - -GVAR(lasers) pushBack _aircraft; -if (local _aircraft) then { - GVAR(localLasers) pushBack _laser; - - // Mark aircraft for JIPs - _aircraft setVariable [QGVAR(laserOn), true, true]; -}; - -if (isServer) then { - private _killedEH = _aircraft addMPEventHandler ["MPKilled", { - params ["_aircraft"]; - [QGVAR(laserOff), [_aircraft]] call CBA_fnc_globalEvent; - }]; - _aircraft setVariable [QGVAR(killedEH), _killedEH]; -}; +GVAR(pfEH) = [LINKFUNC(renderPFH), 0, []] call CBA_fnc_addPerFrameHandler; +TRACE_1("start PFEH",GVAR(pfEH)); diff --git a/addons/markinglaser/functions/fnc_renderPFH.sqf b/addons/markinglaser/functions/fnc_renderPFH.sqf index 8ffe61f6777..696e6f568cf 100644 --- a/addons/markinglaser/functions/fnc_renderPFH.sqf +++ b/addons/markinglaser/functions/fnc_renderPFH.sqf @@ -1,6 +1,6 @@ #include "..\script_component.hpp" /* - * Author: BaerMitUmlaut + * Author: BaerMitUmlaut, PabstMirror * Renders all marking lasers. * * Arguments: @@ -15,80 +15,53 @@ * Public: No */ -if (GVAR(lasers) isEqualTo []) exitWith {}; - -#ifndef DEBUG_MODE_FULL -private _controlledUnit = [ACE_player, ACE_controlledUAV # 1] select (unitIsUAV cameraOn); -if (currentVisionMode _controlledUnit != 1 && { - (!isNull curatorCamera) && { - (_curator getVariable ["BIS_fnc_curatorVisionModes_current", 0]) != 0 - } -}) exitWith {}; -#endif +if (((currentVisionMode focusOn) != 1) || {EGVAR(laser,laserEmitters) isEqualTo []}) exitWith { + GVAR(pfEH) call CBA_fnc_removePerFrameHandler; + GVAR(pfEH) = -1; + TRACE_1("end PFEH",GVAR(pfEH)); +}; { - private _aircraft = _x; - private _gimbalLimits = _aircraft getVariable [QGVAR(gimbalLimits), []]; + _y params ["_aircraft", "", "_laserMethod"]; - // Get laser direction vector - private _vector = if (_aircraft getVariable QGVAR(useTurret)) then { - [_aircraft] call FUNC(getTurretVector) - } else { - [_aircraft] call FUNC(getPilotCamVector) - }; + private _currentMode = _aircraft getVariable [QGVAR(laserMode), MODE_OFF]; + if (_currentMode == MODE_OFF) then { continue }; + if (_laserMethod != QEFUNC(laser,findLaserSource)) then { continue }; // Normal vanilla laserTarget func - // Turn off laser if gimbal limit is reached - // 0.1 is added to calculated values, seems to be slightly inaccurate - _gimbalLimits params ["_minDir", "_maxDir", "_minElev", "_maxElev"]; - private _modelVector = _aircraft vectorWorldToModelVisual _vector; - private _dir = _modelVector # 0 atan2 _modelVector # 1; - if (_dir < _minDir - 0.1 || {_dir > _maxDir + 0.1}) then { - continue; - }; + if ((_currentMode == MODE_FLASH) && { + private _cycle = (CBA_missionTime + (_aircraft getVariable [QGVAR(flashOffset), 0])) % (1/3); + _cycle > 1/6 + }) then { continue }; - private _elevation = _modelVector # 2 atan2 vectorMagnitude [_modelVector # 0, _modelVector # 1, 0]; - if (_elevation < _minElev - 0.1 || {_elevation > _maxElev + 0.1}) then { - continue; - }; + private _targetObject = _aircraft getVariable [QEGVAR(laser,targetObject), objNull]; + private _targetPosASL = getPosASL _targetObject; - private _origin = [0, 0, 0]; - if (_aircraft == cameraOn && {cameraView == "GUNNER"}) then { - _origin = AGLToASL positionCameraToWorld [0, 0, 0]; - } else { - private _originPoint = _aircraft getVariable [QGVAR(laserOrigin), ""]; - _origin = _aircraft modelToWorldVisualWorld (_aircraft selectionPosition _originPoint); - }; + (_y call EFUNC(laser,findLaserSource)) params ["_laserPosASL", "_laserDir"]; - // Check if laser hits object or ground - private _startPos = _origin vectorAdd (_vector vectorMultiply 0.25); - private _endPos = _startPos vectorAdd (_vector vectorMultiply LASER_MAX); + #ifdef DEBUG_MODE_FULL + drawIcon3D ["\a3\ui_f\data\IGUI\Cfg\Cursors\select_target_ca.paa", [1,0,1,1], (ASLToAGL _targetPosASL), 0.5, 0.5, 0, "Laser", 0.5, 0.025, "TahomaB"]; + drawIcon3D ["\a3\ui_f\data\IGUI\Cfg\Cursors\select_target_ca.paa", [1,0,1,1], (ASLToAGL _laserPosASL), 0.5, 0.5, 0, "Origin", 0.5, 0.025, "TahomaB"]; + #endif + + private _smoothing = _aircraft getVariable [QGVAR(smoothing), []]; + _smoothing pushBack _laserDir; + if (count _smoothing > 5) then { _smoothing deleteAt 0 }; + private _smoothDir = [0,0,0]; + { _smoothDir = _smoothDir vectorAdd _x } forEach _smoothing; + _smoothDir = _smoothDir vectorMultiply (1/count _smoothing); + + private _startPos = _laserPosASL vectorAdd (_smoothDir vectorMultiply 0.25); + private _endPos = _laserPosASL vectorAdd (_smoothDir vectorMultiply LASER_MAX); private _intersects = []; while { _intersects isEqualTo [] } do { - _intersects = lineIntersectsSurfaces [_startPos, _endPos, _aircraft]; - drawLaser [ - +_startPos, - _vector, - [250, 0, 0, 1], - [], - 0, - 1, - LASER_MAX, - true - ]; + drawLaser [_startPos, _smoothDir, [250, 0, 0, 1], [], 0, 1, LASER_MAX, true]; // Circumvent limit of drawLaser + if ((_startPos distance _laserPosASL) > 9999) exitWith {}; + _intersects = lineIntersectsSurfaces [_startPos, _endPos, _aircraft]; if (_intersects isEqualTo []) then { _startPos = _endPos; - _endPos = _endPos vectorAdd (_vector vectorMultiply LASER_MAX); + _endPos = _endPos vectorAdd (_smoothDir vectorMultiply LASER_MAX); }; }; - drawLaser [ - _startPos, - _vector, - [250, 0, 0, 1], - [], - 0.5, - 1, - LASER_MAX, - true - ]; -} forEach GVAR(lasers); + drawLaser [_laserPosASL, _smoothDir, [250, 0, 0, 1], [], 0.5, 1, LASER_MAX, true]; +} forEach EGVAR(laser,laserEmitters); diff --git a/addons/markinglaser/functions/fnc_updatePFH.sqf b/addons/markinglaser/functions/fnc_updatePFH.sqf deleted file mode 100644 index 7f4f1086400..00000000000 --- a/addons/markinglaser/functions/fnc_updatePFH.sqf +++ /dev/null @@ -1,41 +0,0 @@ -#include "..\script_component.hpp" -/* - * Author: BaerMitUmlaut - * Sends network updates for all local marking lasers. - * - * Arguments: - * None - * - * Return Value: - * None - * - * Example: - * [] call ace_markinglaser_fnc_updatePFH - * - * Public: No - */ - -if (GVAR(localLasers) isEqualTo []) exitWith {}; - -{ - private _aircraft = _x; - (getPilotCameraTarget _aircraft) params ["_isTracking", "_targetPos", "_targetObj"]; - - private ["_type", "_target"]; - switch (true) do { - case (_isTracking && {!isNull _targetObj}): { - _type = TYPE_OBJECT; - _target = _targetObj; - }; - case (_isTracking): { - _type = TYPE_GROUND; - _target = _targetPos; - }; - default { - _type = TYPE_VECTOR; - _target = getPilotCameraDirection _aircraft; - }; - }; - - _aircraft setVariable [QGVAR(laser), [_type, _target, CBA_missionTime], true]; -} forEach GVAR(localLasers); diff --git a/addons/markinglaser/initSettings.inc.sqf b/addons/markinglaser/initSettings.inc.sqf index 7d63081fb3b..c7e59d8769e 100644 --- a/addons/markinglaser/initSettings.inc.sqf +++ b/addons/markinglaser/initSettings.inc.sqf @@ -1,8 +1,8 @@ -[ - QGVAR(enabled), - "CHECKBOX", - [LSTRING(Setting_Enabled_DisplayName), LSTRING(Setting_Enabled_Description)], - ELSTRING(common,ACEKeybindCategoryVehicles), - true, - 1 -] call CBA_fnc_addSetting; +// [ +// QGVAR(enabled), +// "CHECKBOX", +// [LSTRING(Setting_Enabled_DisplayName), LSTRING(Setting_Enabled_Description)], +// ELSTRING(common,ACEKeybindCategoryVehicles), +// true, +// 1 +// ] call CBA_fnc_addSetting; diff --git a/addons/markinglaser/script_component.hpp b/addons/markinglaser/script_component.hpp index e6fb3006009..57b051e0786 100644 --- a/addons/markinglaser/script_component.hpp +++ b/addons/markinglaser/script_component.hpp @@ -17,8 +17,7 @@ #include "\z\ace\addons\main\script_macros.hpp" #define LASER_MAX 3000 -#define UPDATE_INTERVAL 1 -#define TYPE_OBJECT "OBJECT" -#define TYPE_GROUND "GROUND" -#define TYPE_VECTOR "VECTOR" +#define MODE_OFF 0 +#define MODE_ON 1 +#define MODE_FLASH 2