ACE3/addons/laser/functions/fnc_onLaserDesignatorDraw.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

29 lines
726 B
Plaintext

/*
* Author: Nou
* Update distance when rangefinder laser is on
*
* Arguments:
* None
*
* Return Value:
* None
*
* Example:
* [] call ace_laser_fnc_onLaserDesignatorDraw
*
* Public: No
*/
#include "script_component.hpp"
private _laserCode = ACE_player getVariable[QGVAR(code), ACE_DEFAULT_LASER_CODE];
if (!isNil "_laserCode") then {
__LaserDesignatorIGUI_LaserCode ctrlSetText format["Code: %1", [_laserCode, 4, 0, false] call CBA_fnc_formatNumber];
};
if (! (ctrlShown __LaserDesignatorIGUI_LaserOn) ) then {
// TODO: hide distance
__LaserDesignatorIGUI_ACE_Distance ctrlSetText "----";
} else {
__LaserDesignatorIGUI_ACE_Distance ctrlSetText (ctrlText __LaserDesignatorIGUI_CA_Distance);
};