ACE3/addons/laser/XEH_postInit.sqf
Nicolás Badano ab6fc8efca Laser guidance for all designators (#3308)
* Fix laser and missileguidance over water

* Return a normalized vector in EFUNC(common,getTurretDirection)

* Make laser dispersion simulation optional, default off

* Prototype for ace_laser_designate

* Remove vanilla laser handling from ace_laser in favor of the new code on ace_laser_designate

* Simplify laser into one module

Rewrite large parts of laser
Merge laser_designate
Delete lase_selfDesignate

* Cleanup missile guidance

* Headers, fix laser over water

* Cleanup

* Test

* Change setting to scalar, more cleanup

* Add seeker debug drawing
2016-10-08 12:55:30 +02:00

24 lines
691 B
Plaintext

#include "script_component.hpp"
#include "initKeybinds.sqf"
// Global Laser EHs
["ace_laserOn", {
params ["_uuid", "_args"];
TRACE_2("ace_laserOn eh",_uuid,_args);
[GVAR(laserEmitters), _uuid, _args] call CBA_fnc_hashSet;
}] call CBA_fnc_addEventHandler;
["ace_laserOff", {
params ["_uuid"];
TRACE_1("ace_laserOn eh",_uuid);
if ([GVAR(laserEmitters), _uuid] call CBA_fnc_hashHasKey) then {
[GVAR(laserEmitters), _uuid] call CBA_fnc_hashRem;
};
}] call CBA_fnc_addEventHandler;
// Shows detector and mine posistions in 3d when debug is on
#ifdef DRAW_LASER_INFO
addMissionEventHandler ["Draw3D", {_this call FUNC(dev_drawVisibleLaserTargets)}];
#endif