Adjust model to reflect real-life one

This commit is contained in:
Brandon-PC\Brandon 2019-01-12 04:37:04 -07:00
parent 4df8fd77b1
commit f317b092eb
2 changed files with 7 additions and 17 deletions

View File

@ -25,8 +25,11 @@ _attackProfileStateParams params["_maxCorrectableDistance", "_wireCut", "_random
_stateParams params ["_lastRunTime"];
private _projectilePos = getPosASL _projectile;
private _distanceToProjectile = (getPosASL _shooter) vectorDistanceSqr _projectilePos;
if ((((getPosASL _shooter) vectorDistanceSqr _projectilePos) > _seekerMaxRangeSqr) || { _wireCut }) exitWith {
if (_distanceToProjectile <= 65) exitWith { _projectilePos vectorAdd (AGLtoASL (_projectile vectorModelToWorld [0, 50, 0])) };
if ((_distanceToProjectile > _seekerMaxRangeSqr) || { _wireCut }) exitWith {
// wire snap, random direction
if (_randomVector isEqualTo [0, 0, 0]) then {
_randomVector = RANDOM_VECTOR_3D vectorMultiply 300;
@ -38,8 +41,9 @@ if ((((getPosASL _shooter) vectorDistanceSqr _projectilePos) > _seekerMaxRangeSq
_projectilePos vectorAdd _randomVector
};
_maxCorrectableDistance = 30;
// if the time between updates is less than the pop time we want to fire the rockets
if ((_lastTime - CBA_missionTime) <= 0) then {
// if the time between updates is less than the pop time we want to fire the rockets OR if the missile wants to make a major correction pop it rapidly
if (((_lastTime - CBA_missionTime) <= 0) || {(_lastTime - CBA_missionTime) < (SERVICE_INTERVAL / 2) && (_projectilePos vectorDistance _seekerTargetPos > 1)}) then {
_attackProfileStateParams set [6, CBA_missionTime + SERVICE_INTERVAL];
private _vectorToCrosshair = vectorNormalized (_projectile worldToModel (ASLToAGL _seekerTargetPos));
@ -53,20 +57,6 @@ if ((_lastTime - CBA_missionTime) <= 0) then {
private _charge = createVehicle ["ace_m47_dragon_serviceCharge", [0, 0, 0], [], 0, "NONE"];
_charge setPosASL (_projectilePos vectorAdd ((_vectorToCrosshair vectorMultiply -1) vectorMultiply 0.025));
} else {
/*if((_lastTime - CBA_missionTime) < (SERVICE_INTERVAL / 2)) then {
if ((_projectilePos vectorDistance _seekerTargetPos > 1)) then {
_attackProfileStateParams set [6, CBA_missionTime + SERVICE_INTERVAL];
private _vectorToCrosshair = vectorNormalized (_projectile worldToModel (ASLToAGL _seekerTargetPos));
private _vectorToPos = vectorNormalized (((_projectile vectorWorldToModelVisual (_shooter weaponDirection _weapon)) vectorMultiply (100 * 0.3)) vectorAdd (_vectorToCrosshair vectorMultiply _maxCorrectableDistance));
if ((_vectorToPos select 2) < 0) then {
_vectorToPos set [2, 0];
};
_projectile setVelocityModelSpace ((velocityModelSpace _projectile) vectorAdd (_vectorToPos vectorMultiply 6.5));
};
};*/
};
// Return position in-front of projectile. Because we simulate the velocity updates in this function we dont want missile guidance taking over

Binary file not shown.