Skip to content

Commit

Permalink
Merge pull request #4014 from acemod/apexTitanBandaid
Browse files Browse the repository at this point in the history
Handle bad target when using apex titans
  • Loading branch information
thojkooi authored Jun 28, 2016
2 parents 4251831 + 2037638 commit 01c184b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions addons/missileguidance/functions/fnc_checkLos.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ private["_seeker", "_seekerPos", "_target", "_targetPos", "_return", "_vectorTo"
_seeker = _this select 0;
_target = _this select 1;

if ((isNil "_seeker") || {isNil "_target"}) exitWith {false};

_targetPos = getPosASL _target;
_seekerPos = getPosASL _seeker;
_return = true;
Expand Down
6 changes: 6 additions & 0 deletions addons/missileguidance/functions/fnc_onFired.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,12 @@ if(isNil "_target") then {
};
};

//ToDo: Add correct configs for new apex titans (in ace_javelin)
if ((isNil "_target") && {(_weapon == "launch_B_Titan_short_tna_F") || {_weapon == "launch_O_Titan_short_ghex_F"}}) then {
ACE_LOGWARNING_1("APEX Launcher [%1] not supported - Wait for ACE 3.6.1",_weapon);
if (!isNull cursorObject) then {_target = cursorObject;}; //Attempt to give some kind of target or it will
};

TRACE_4("Beginning ACE guidance system",_target,_ammo,_seekerType,_attackProfile);
_args = [_this,
[_shooter,
Expand Down

0 comments on commit 01c184b

Please sign in to comment.