mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Run attack profile even if no target
This commit is contained in:
parent
ae0eab3a51
commit
4bb02a320b
@ -27,6 +27,8 @@ params ["_seekerTargetPos", "_args", "_attackProfileStateParams"];
|
||||
_args params ["_firedEH"];
|
||||
_firedEH params ["_shooter","","","","","","_projectile"];
|
||||
|
||||
if (_seekerTargetPos isEqualTo [0,0,0]) exitWith {_seekerTargetPos};
|
||||
|
||||
if (_attackProfileStateParams isEqualTo []) then {
|
||||
_attackProfileStateParams set [0, STAGE_LAUNCH];
|
||||
};
|
||||
|
@ -27,6 +27,8 @@ params ["_seekerTargetPos", "_args", "_attackProfileStateParams"];
|
||||
_args params ["_firedEH"];
|
||||
_firedEH params ["_shooter","","","","","","_projectile"];
|
||||
|
||||
if (_seekerTargetPos isEqualTo [0,0,0]) exitWith {_seekerTargetPos};
|
||||
|
||||
if (_attackProfileStateParams isEqualTo []) then {
|
||||
_attackProfileStateParams set [0, STAGE_LAUNCH];
|
||||
};
|
||||
|
@ -22,6 +22,8 @@ params ["_seekerTargetPos", "_args"];
|
||||
_args params ["_firedEH"];
|
||||
_firedEH params ["_shooter","","","","","","_projectile"];
|
||||
|
||||
if (_seekerTargetPos isEqualTo [0,0,0]) exitWith {_seekerTargetPos};
|
||||
|
||||
private _shooterPos = getPosASL _shooter;
|
||||
private _projectilePos = getPosASL _projectile;
|
||||
|
||||
|
@ -52,10 +52,11 @@ private _projectilePos = getPosASL _projectile;
|
||||
// Run seeker function:
|
||||
private _seekerTargetPos = [[0,0,0], _args, _seekerStateParams, _lastKnownPosState] call FUNC(doSeekerSearch);
|
||||
|
||||
// Run attack profile function:
|
||||
private _profileAdjustedTargetPos = [_seekerTargetPos, _args, _attackProfileStateParams] call FUNC(doAttackProfile);
|
||||
|
||||
// If we have no seeker target, then do not change anything
|
||||
if (!(_seekerTargetPos isEqualTo [0,0,0])) then {
|
||||
// Run attack profile function:
|
||||
private _profileAdjustedTargetPos = [_seekerTargetPos, _args, _attackProfileStateParams] call FUNC(doAttackProfile);
|
||||
if (!(_profileAdjustedTargetPos isEqualTo [0,0,0])) then {
|
||||
|
||||
private _targetVector = _projectilePos vectorFromTo _profileAdjustedTargetPos;
|
||||
private _adjustVector = _targetVector vectorDiff (vectorDir _projectile);
|
||||
|
Loading…
Reference in New Issue
Block a user