Skip to content
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion addons/missileguidance/functions/fnc_gps_getAttackData.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,16 @@
*/

if (GVAR(gps_mode) isEqualTo "too") then {
private _target = getPilotCameraTarget (vehicle ACE_PLAYER);
private _focusOn = focusOn;
private _vehFocusOn = vehicle _focusOn;
private _target = getPilotCameraTarget _vehFocusOn;
_target params ["_tracking", "_position", "_object"];
if (driver _vehFocusOn isNotEqualTo _focusOn) then {
_position = _vehFocusOn lockedCameraTo [focusOn call CBA_fnc_turretPath];
if (_position isEqualType objNull) then { // lockedCameraTo has different return types, can be object as well as position.
_position = getPosASL _position;
};
};
GVAR(gps_currentSettings) set [0, _position]
};

Expand Down
2 changes: 1 addition & 1 deletion addons/missileguidance/functions/fnc_gps_setupVehicle.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ TRACE_2("adding gps action",_player,typeOf _vehicle);
private _condition = {
params ["_target", "_player"]; // _player may be the UAV AI

private _turretPath = if (_player == (driver _target)) then {[-1]} else {_player call CBA_fnc_turretPath};
private _turretPath = if (focusOn isEqualTo driver _target) then {[-1]} else {focusOn call CBA_fnc_turretPath};
private _hasJDAM = (_target weaponsTurret _turretPath) findIf {
private _weapon = _x;
GVAR(gps_weapons) getOrDefaultCall [_weapon, {
Expand Down