Hi
I've made some loadout edits in a class file, but I get some strange behaviour when trying to bomb.
When I press the drop bombs key, 2 bombs are dropped but the "original" bombs are still displayed attached to the aircraft.
And if I press the bomb key several times the same two bombs are dropped over and over again.
Any ideas what might be wrong?
I had no problems compiling and the log file shows no Java errors.
The Java code:
Aircraft.weaponTriggersRegister(class1, new int[] {
0, 0, 10, 10, 3, 3, 3, 3, 3, 3,
3, 3, 3, 3, 3, 3
});
Aircraft.weaponHooksRegister(class1, new String[] {
"_MGUN01", "_MGUN02", "_MGUN03", "_MGUN04", "_ExternalBomb01", "_ExternalBomb02", "_ExternalBomb03", "_ExternalBomb04", "_ExternalBomb05", "_ExternalBomb06",
"_ExternalBomb07", "_ExternalBomb08", "_ExternalBomb09", "_ExternalBomb10", "_ExternalBomb11", "_ExternalBomb12"
});
try
{
ArrayList arraylist = new ArrayList();
Property.set(class1, "weaponsList", arraylist);
HashMapInt hashmapint = new HashMapInt();
Property.set(class1, "weaponsMap", hashmapint);
byte byte0 = 16;
Aircraft._WeaponSlot a_lweaponslot[] = new Aircraft._WeaponSlot[byte0];
String s = "default";
a_lweaponslot = new Aircraft._WeaponSlot[byte0];
a_lweaponslot[0] = null;
a_lweaponslot[1] = null;
a_lweaponslot[2] = new Aircraft._WeaponSlot(10, "MGunVikkersKt", 500);
a_lweaponslot[3] = new Aircraft._WeaponSlot(10, "MGunVikkersKt", 500);
a_lweaponslot[4] = null;
a_lweaponslot[5] = null;
a_lweaponslot[6] = null;
a_lweaponslot[7] = null;
a_lweaponslot[8] = null;
a_lweaponslot[9] = null;
a_lweaponslot[10] = null;
a_lweaponslot[11] = null;
a_lweaponslot[12] = null;
a_lweaponslot[13] = null;
a_lweaponslot[14] = null;
a_lweaponslot[15] = null;
arraylist.add(s);
hashmapint.put(Finger.Int(s), a_lweaponslot);
s = "8x50kg";
a_lweaponslot = new Aircraft._WeaponSlot[byte0];
a_lweaponslot[0] = null;
a_lweaponslot[1] = null;
a_lweaponslot[2] = new Aircraft._WeaponSlot(10, "MGunVikkersKt", 500);
a_lweaponslot[3] = new Aircraft._WeaponSlot(10, "MGunVikkersKt", 500);
a_lweaponslot[4] = new Aircraft._WeaponSlot(3, "BombGun50kg", 1);
a_lweaponslot[5] = new Aircraft._WeaponSlot(3, "BombGun50kg", 1);
a_lweaponslot[6] = new Aircraft._WeaponSlot(3, "BombGun50kg", 1);
a_lweaponslot[7] = new Aircraft._WeaponSlot(3, "BombGun50kg", 1);
a_lweaponslot[8] = null;
a_lweaponslot[9] = null;
a_lweaponslot[10] = new Aircraft._WeaponSlot(3, "BombGun50kg", 1);
a_lweaponslot[11] = new Aircraft._WeaponSlot(3, "BombGun50kg", 1);
a_lweaponslot[12] = new Aircraft._WeaponSlot(3, "BombGun50kg", 1);
a_lweaponslot[13] = new Aircraft._WeaponSlot(3, "BombGun50kg", 1);
a_lweaponslot[14] = null;
a_lweaponslot[15] = null;
arraylist.add(s);
hashmapint.put(Finger.Int(s), a_lweaponslot);
s = "4x100kg+8x50kg";
a_lweaponslot = new Aircraft._WeaponSlot[byte0];
a_lweaponslot[0] = null;
a_lweaponslot[1] = null;
a_lweaponslot[2] = new Aircraft._WeaponSlot(10, "MGunVikkersKt", 500);
a_lweaponslot[3] = new Aircraft._WeaponSlot(10, "MGunVikkersKt", 500);
a_lweaponslot[4] = new Aircraft._WeaponSlot(3, "BombGun50kg", 1);
a_lweaponslot[5] = new Aircraft._WeaponSlot(3, "BombGun50kg", 1);
a_lweaponslot[6] = new Aircraft._WeaponSlot(3, "BombGun100kg", 1);
a_lweaponslot[7] = new Aircraft._WeaponSlot(3, "BombGun100kg", 1);
a_lweaponslot[8] = new Aircraft._WeaponSlot(3, "BombGun50kg", 1);
a_lweaponslot[9] = new Aircraft._WeaponSlot(3, "BombGun50kg", 1);
a_lweaponslot[10] = new Aircraft._WeaponSlot(3, "BombGun50kg", 1);
a_lweaponslot[11] = new Aircraft._WeaponSlot(3, "BombGun50kg", 1);
a_lweaponslot[12] = new Aircraft._WeaponSlot(3, "BombGun100kg", 1);
a_lweaponslot[13] = new Aircraft._WeaponSlot(3, "BombGun100kg", 1);
a_lweaponslot[14] = new Aircraft._WeaponSlot(3, "BombGun50kg", 1);
a_lweaponslot[15] = new Aircraft._WeaponSlot(3, "BombGun50kg", 1);
arraylist.add(s);
hashmapint.put(Finger.Int(s), a_lweaponslot);
s = "4x250kg";
a_lweaponslot = new Aircraft._WeaponSlot[byte0];
a_lweaponslot[0] = null;
a_lweaponslot[1] = null;
a_lweaponslot[2] = new Aircraft._WeaponSlot(10, "MGunVikkersKt", 500);
a_lweaponslot[3] = new Aircraft._WeaponSlot(10, "MGunVikkersKt", 500);
a_lweaponslot[4] = null;
a_lweaponslot[5] = null;
a_lweaponslot[6] = new Aircraft._WeaponSlot(3, "BombGun100kg", 1);
a_lweaponslot[7] = new Aircraft._WeaponSlot(3, "BombGun100kg", 1);
a_lweaponslot[8] = null;
a_lweaponslot[9] = null;
a_lweaponslot[10] = null;
a_lweaponslot[11] = null;
a_lweaponslot[12] = new Aircraft._WeaponSlot(3, "BombGun100kg", 1);
a_lweaponslot[13] = new Aircraft._WeaponSlot(3, "BombGun100kg", 1);
a_lweaponslot[14] = null;
a_lweaponslot[15] = null;
arraylist.add(s);
hashmapint.put(Finger.Int(s), a_lweaponslot);
s = "none";
a_lweaponslot = new Aircraft._WeaponSlot[byte0];
a_lweaponslot[0] = null;
a_lweaponslot[1] = null;
a_lweaponslot[2] = null;
a_lweaponslot[3] = null;
a_lweaponslot[4] = null;
a_lweaponslot[5] = null;
a_lweaponslot[6] = null;
a_lweaponslot[7] = null;
a_lweaponslot[8] = null;
a_lweaponslot[9] = null;
a_lweaponslot[10] = null;
a_lweaponslot[11] = null;
a_lweaponslot[12] = null;
a_lweaponslot[13] = null;
a_lweaponslot[14] = null;
a_lweaponslot[15] = null;
arraylist.add(s);
hashmapint.put(Finger.Int(s), a_lweaponslot);
}
catch(Exception exception) { }
}
}
Thanks in advance for any help!
Best regards
vonOben