Forgot to set terminal on short-range attacks. Fixes #630

This commit is contained in:
jaynus 2015-04-15 12:09:47 -07:00
parent f40373bb78
commit 5bcb0ec493

View File

@ -48,9 +48,12 @@ switch( (_state select 0) ) do {
_cruisAlt = 140 * (_distanceShooterToTarget/1250);
TRACE_1("_cruisAlt", _cruisAlt);
};
if( ((ASLToATL _projectilePos) select 2) - ((ASLToATL _seekerTargetPos) select 2) >= _cruisAlt) then {
if(_cruisAlt < 140) then {
_state set[0, STAGE_TERMINAL];
} else {
_state set[0, STAGE_COAST];
};
} else {
_returnTargetPos = _seekerTargetPos vectorAdd [0,0,_distanceToTarget*2];
};