mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
ab6fc8efca
* 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
29 lines
726 B
Plaintext
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);
|
|
};
|