mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Tweak target acquisition. Reset target after shooting
This commit is contained in:
parent
8da028b626
commit
e91b8bc2df
@ -24,6 +24,8 @@ private _intersections = lineIntersectsSurfaces [_origin, _origin vectorAdd (_di
|
||||
if (_intersections isNotEqualTo []) then {
|
||||
(_intersections#0) params ["_intersectPos", "", "_object"];
|
||||
|
||||
drawIcon3D ["\a3\ui_f\data\IGUI\Cfg\Cursors\selectover_ca.paa", [1,0,0,1], ASLtoAGL _intersectPos, 0.75, 0.75, 0, "", 1, 0.025, "TahomaB"];
|
||||
|
||||
if (_designateInput == 1) then {
|
||||
_seekerTargetPos = _intersectPos;
|
||||
};
|
||||
|
@ -53,7 +53,9 @@ if (cameraView isEqualTo "GUNNER") then {
|
||||
|
||||
private _designating = __SPIKE_DISPLAY getVariable [QGVAR(designate), 0];
|
||||
if (_currentAmmo != 0 && { _designating == 1 || _targetPosition isNotEqualTo [0, 0, 0] }) then {
|
||||
_targetPosition = [eyePos _currentShooter, getCameraViewDirection _currentShooter, _designating, _targetPosition, _currentShooter] call FUNC(getTargetPosition);
|
||||
private _viewASL = AGLtoASL positionCameraToWorld [0,0,0];
|
||||
private _viewDir = _viewASL vectorFromTo (AGLtoASL positionCameraToWorld [0,0,1]);
|
||||
_targetPosition = [_viewASL, _viewDir, _designating, _targetPosition, _currentShooter] call FUNC(getTargetPosition);
|
||||
GVAR(arguments) set [1, _targetPosition];
|
||||
};
|
||||
|
||||
|
@ -68,6 +68,7 @@ if (!(_cameraConfig isEqualTo configNull) && { (getNumber (_cameraConfig >> "ena
|
||||
};
|
||||
|
||||
private _preTarget = +(ACE_PLAYER getVariable [QGVAR(target), [0, 0, 0]]);
|
||||
ACE_PLAYER setVariable [QGVAR(target), [0, 0, 0]];
|
||||
private _camera = [_projectile, _cameraArray, _shooter, _preTarget isEqualTo [0, 0, 0]] call FUNC(camera_init);
|
||||
GVAR(projectileHashMap) set [hashValue _projectile, [_camera, _preTarget]];
|
||||
[{
|
||||
|
Loading…
Reference in New Issue
Block a user