Fix cruise heigh on close shots (#4795)

This commit is contained in:
PabstMirror 2016-12-29 15:04:19 -06:00 committed by GitHub
parent e94ca3fab9
commit 3cd80a42d7
2 changed files with 4 additions and 2 deletions

View File

@ -2,6 +2,8 @@
ADDON = false;
PREP_RECOMPILE_START;
#include "XEH_PREP.hpp"
PREP_RECOMPILE_END;
ADDON = true;

View File

@ -56,9 +56,9 @@ switch( (_attackProfileStateParams select 0) ) do {
};
case STAGE_CLIMB: {
TRACE_1("STAGE_CLIMB","");
_cruisAlt = 140;
private _cruisAlt = 140;
if (_distanceShooterToTarget < 1250) then {
private _cruisAlt = 140 * (_distanceShooterToTarget/1250);
_cruisAlt = 140 * (_distanceShooterToTarget/1250);
TRACE_1("_cruisAlt", _cruisAlt);
};
if ( ((ASLToAGL _projectilePos) select 2) - ((ASLToAGL _seekerTargetPos) select 2) >= _cruisAlt) then {