add TOO TGP

This commit is contained in:
Brandon Danyluk 2021-04-18 23:05:56 -06:00
parent e1cdbb777f
commit 3878c67c87

View File

@ -29,8 +29,25 @@
// update current settings
GVAR(gps_uiPerFrameHandler) = [{
if (GVAR(mode) isEqualTo "too") then {
// update coordinates based on TGP position
private _target = getPilotCameraTarget (vehicle ACE_PLAYER);
_target params ["_tracking", "_position", "_object"];
if (_position isNotEqualTo [0, 0, 0]) then {
private _mapGrid = [_position] call EFUNC(common,getMapGridFromPos);
_mapGrid params ["_easting", "_northing"];
private _height = _position#2;
private _display = uiNamespace getVariable QGVAR(gpsAttackOptionDisplay);
(_display displayCtrl GPS_UI_EASTING) ctrlSetText _easting;
(_display displayCtrl GPS_UI_NORTHING) ctrlSetText _northing;
(_display displayCtrl GPS_UI_HEIGHT) ctrlSetText str _height;
};
};
// info is read from text boxes, so if boxes are update this will be updated
GVAR(gps_currentSettings) = [-1] call FUNC(gps_saveAttackSettings);
systemChat str GVAR(gps_currentSettings);
}] call CBA_fnc_addPerFrameHandler;
}, _this] call CBA_fnc_execNextFrame;