mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Javelin locking fire modes were reversed.
This commit is contained in:
parent
c428bf051f
commit
5083a5a0d2
@ -9,15 +9,11 @@ class CfgAmmo {
|
||||
class M_PG_AT : MissileBase {
|
||||
model = "\A3\Weapons_F\Ammo\Rocket_01_fly_F";
|
||||
proxyShape = "\A3\Weapons_F\Ammo\Rocket_01_F";
|
||||
|
||||
|
||||
irLock = 0;
|
||||
laserLock = 0;
|
||||
airLock = 0;
|
||||
weaponLockSystem = "2 + 16";
|
||||
|
||||
hit = 600;
|
||||
indirectHit = 50;
|
||||
indirectHitRange = 4;
|
||||
|
||||
maxSpeed = 720;
|
||||
maxControlRange = 5000;
|
||||
@ -29,7 +25,7 @@ class CfgAmmo {
|
||||
initTime = 0.002;
|
||||
thrustTime = 1.07;
|
||||
thrust = 530;
|
||||
fuseDistance = 5;
|
||||
fuseDistance = 2;
|
||||
|
||||
effectsMissileInit = "MissileDAR1";
|
||||
effectsMissile = "missile2";
|
||||
@ -132,7 +128,7 @@ class CfgAmmo {
|
||||
seekerMaxRange = 2500; // Range from the missile which the seeker can visually search
|
||||
|
||||
// Attack profile type selection
|
||||
defaultAttackProfile = "TOP";
|
||||
defaultAttackProfile = "LIN";
|
||||
attackProfiles[] = { "TOP", "LIN" };
|
||||
};
|
||||
};
|
||||
|
@ -22,11 +22,11 @@ TRACE_2("", _distanceToTarget, _distanceToShooter);
|
||||
_addHeight = [0,0,0];
|
||||
|
||||
// Always climb an arc on initial launch if we are close to the round
|
||||
if( ((ASLtoATL _projectilePos) select 2) < 50 && _distanceToShooter < 50) then {
|
||||
if( ((ASLtoATL _projectilePos) select 2) < 140 && _distanceToShooter < 50) then {
|
||||
_addHeight = _addHeight vectorAdd [0,0,_distanceToTarget];
|
||||
} else {
|
||||
// If we are below the target, increase the climbing arc
|
||||
if((_projectilePos select 2) < (_seekerTargetPos select 2) && _distanceToTarget > 100) then {
|
||||
if((_projectilePos select 2) < (_seekerTargetPos select 2) + 140 && _distanceToTarget > 100) then {
|
||||
_addHeight = _addHeight vectorAdd [0,0, ((_seekerTargetPos select 2) - (_projectilePos select 2))+50];
|
||||
};
|
||||
};
|
||||
@ -36,7 +36,7 @@ if( (_projectilePos select 2) > (_seekerTargetPos select 2) && _distanceToTarget
|
||||
_addHeight = _addHeight vectorDiff [0,0, ((_projectilePos select 2) - (_seekerTargetPos select 2)) * 0.5];
|
||||
} else {
|
||||
if((_projectilePos select 2) > (_seekerTargetPos select 2) && _distanceToTarget > 100) then {
|
||||
_addHeight = _addHeight vectorAdd [0,0, _distanceToTarget*0.02];
|
||||
_addHeight = _addHeight vectorDiff [0,0, ((_projectilePos select 2) - (_seekerTargetPos select 2)) * 0.5];
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -35,7 +35,6 @@ if ( isNil "_attackProfile" || { ! ( _attackProfile in (getArray (_config >> "at
|
||||
if ( isNil "_lockMode" || { ! ( _lockMode in (getArray (_config >> "seekerLockModes" ) ) ) } ) then {
|
||||
_lockMode = getText (_config >> "defaultSeekerLockMode");
|
||||
};
|
||||
|
||||
|
||||
TRACE_4("Beginning ACE guidance system",_target,_ammo,_seekerType,_attackProfile);
|
||||
[FUNC(guidancePFH), 0, [_this,
|
||||
@ -58,3 +57,10 @@ TRACE_4("Beginning ACE guidance system",_target,_ammo,_seekerType,_attackProfile
|
||||
[ diag_tickTime ]
|
||||
]
|
||||
] call cba_fnc_addPerFrameHandler;
|
||||
|
||||
/* Clears locking settings
|
||||
(vehicle _shooter) setVariable [QGVAR(target), nil];
|
||||
(vehicle _shooter) setVariable [QGVAR(seekerType), nil];
|
||||
(vehicle _shooter) setVariable [QGVAR(attackProfile), nil];
|
||||
(vehicle _shooter) setVariable [QGVAR(lockMode), nil];
|
||||
*/
|
@ -77,6 +77,9 @@ if(!isNil "_seekerTargetPos") then {
|
||||
_adjustTime = _adjustTime * (_runtimeDelta / TIMESTEP_FACTOR);
|
||||
TRACE_4("Adjust timing", 1/accTime, _adjustTime, _runtimeDelta, (_runtimeDelta / TIMESTEP_FACTOR) );
|
||||
|
||||
// @TODO: Apply velocity multiplier to yaw/pitch. Basically, it can adjust faster at lower speeds
|
||||
//_adjustDeflection = (vectorMagnitude velocity _projectile);
|
||||
|
||||
_outVector = [_projectile, [_xVec, _yVec, _zVec], [_yaw, _adjustTime, _pitch]] call FUNC(translateToModelSpace);
|
||||
_vectorTo = _projectilePos vectorFromTo _outVector;
|
||||
|
||||
|
@ -5,7 +5,7 @@ TRACE_1("enter", _this);
|
||||
private["_player", "_currentFireMode"];
|
||||
|
||||
_currentFireMode = ACE_player getVariable["ace_missileguidance_attackProfile", "TOP"];
|
||||
if(_currentFireMode == "LIN") then {
|
||||
if(_currentFireMode == "TOP") then {
|
||||
__JavelinIGUITop ctrlSetTextColor __ColorGreen;
|
||||
__JavelinIGUIDir ctrlSetTextColor __ColorGray;
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user