Skip to content

Commit

Permalink
Stores: Revert adding AGM-154A to be droppable by CCRP and CCIP. Commit
Browse files Browse the repository at this point in the history
  • Loading branch information
NikolaiVChr committed Sep 22, 2023
1 parent 0d2f1d0 commit 4749769
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
12 changes: 10 additions & 2 deletions Nasal/HUD/HUD_main.nas
Original file line number Diff line number Diff line change
Expand Up @@ -3030,7 +3030,7 @@ append(obj.total, obj.speed_curr);
}
var selW = pylons.fcs.getSelectedWeapon();
if (selW != nil and !hdp.CCIP_active and
(selW.type=="MK-82" or selW.type=="MK-82AIR" or selW.type=="MK-83" or selW.type=="MK-84" or selW.type=="GBU-12" or selW.type=="GBU-31" or selW.type=="GBU-54" or selW.type=="GBU-24" or selW.type=="CBU-87" or selW.type=="CBU-105" or selW.type=="AGM-154A" or selW.type=="B61-7" or selW.type=="B61-12") and selW.status == armament.MISSILE_LOCK ) {
(me.containsVector(fc.CCIP_CCRP, selW.type) and selW.status == armament.MISSILE_LOCK ) {

if (selW.guidance == "unguided") {
me.dt = 0.1;
Expand Down Expand Up @@ -3096,7 +3096,7 @@ append(obj.total, obj.speed_curr);
if(hdp.CCIP_active) {
if (hdp.fcs_available and hdp.getproper("master_arm") != 0) {
var selW = pylons.fcs.getSelectedWeapon();
if (selW != nil and (selW.type=="MK-82" or selW.type=="MK-82AIR" or selW.type=="MK-83" or selW.type=="MK-84" or selW.type=="GBU-12" or selW.type=="GBU-31" or selW.type=="GBU-54" or selW.type=="GBU-24" or selW.type=="CBU-87" or selW.type=="CBU-105" or selW.type=="B61-7" or selW.type=="B61-12")) {
if (selW != nil and me.containsVector(fc.CCIP_CCRP, selW.type)) {
me.showmeCCIP = 1;
me.ccipPos = pylons.fcs.getSelectedWeapon().getCCIPadv(18,0.20);
if (me.ccipPos == nil) {
Expand Down Expand Up @@ -3438,6 +3438,14 @@ append(obj.total, obj.speed_curr);
}
}
},
containsVector: func (vec, item) {
foreach(test; vec) {
if (test == item) {
return 1;
}
}
return 0;
},
extrapolate: func (x, x1, x2, y1, y2) {
return y1 + ((x - x1) / (x2 - x1)) * (y2 - y1);
},
Expand Down
7 changes: 5 additions & 2 deletions Nasal/fire-control.nas
Original file line number Diff line number Diff line change
Expand Up @@ -1285,9 +1285,12 @@ var printfDebug = func {if (debug == 1) call(printf,arg);};



# This is non-generic methods, please edit it to fit your radar setup:
# This is non-generic methods, please edit it to fit your radar/weapon setup:

# List of weapons that can be CCIP/CCRP dropped:
var CCIP_CCRP = ["MK-82","MK-82AIR","MK-83","MK-84","GBU-12","GBU-24","GBU-54","CBU-87","CBU-105","GBU-31","B61-7","B61-12"];
# List of weapons that can be ripple/dual dropped:
var dualWeapons = ["MK-82","MK-82AIR","MK-83","MK-84","GBU-12","GBU-24","GBU-54","CBU-87","CBU-105","GBU-31","AGM-154A","B61-7","B61-12"];
var dualWeapons = ["MK-82","MK-82AIR","MK-83","MK-84","GBU-12","GBU-24","GBU-54","CBU-87","CBU-105","GBU-31","B61-7","B61-12","AGM-154A"];
var defaultCannon = "20mm Cannon";
var defaultRocket = "LAU-68";
var getCompleteRadarTargetsList = func {
Expand Down

0 comments on commit 4749769

Please sign in to comment.