Выкинь нахер этот вар_класс и напиши по людски, что бы Ил не давился САСовской стряпьнёй.
Вот только калякал класс для УТ-1ГАЗ., родного класса не было.
Молва не дал мода - пришлось тестить на другом УТ-1.
Код:
private static Aircraft._WeaponSlot[] GenerateDefaultConfig(int i)
{
Aircraft._WeaponSlot a_lweaponslot[] = new Aircraft._WeaponSlot[i];
try
{
a_lweaponslot[0] = null;
}
catch(Exception exception) { }
return a_lweaponslot;
}
static Class _mthclass$(String s)
{
Class class1;
try
{
class1 = Class.forName(s);
}
catch(ClassNotFoundException classnotfoundexception)
{
throw new NoClassDefFoundError(classnotfoundexception.getMessage());
}
return class1;
}
static
{
Class class1 = com.maddox.il2.objects.air.UT_1GAZ.class;
new NetAircraft.SPAWN(class1);
Property.set(class1, "iconFar_shortClassName", "UT-1GAZ");
Property.set(class1, "meshName", "3DO/Plane/UT-1/hier.him");
Property.set(class1, "PaintScheme", new PaintSchemeFMPar05());
Property.set(class1, "yearService", 1937F);
Property.set(class1, "yearExpired", 1952F);
Property.set(class1, "FlightModel", "FlightModels/UT-1GAZ.fmd:UT1_FM");
Property.set(class1, "cockpitClass", new Class[] {
com.maddox.il2.objects.air.CockpitUT1.class
});
Aircraft.weaponTriggersRegister(class1, new int[] {
0
});
Aircraft.weaponHooksRegister(class1, new String[] {
"null"
});
try
{
ArrayList arraylist = new ArrayList();
Property.set(class1, "weaponsList", arraylist);
HashMapInt hashmapint = new HashMapInt();
Property.set(class1, "weaponsMap", hashmapint);
byte byte0 = 1;
String s = "default";
Aircraft._WeaponSlot a_lweaponslot[] = new Aircraft._WeaponSlot[byte0];
a_lweaponslot[0] = null;
for(int i = 1; i < byte0; i++)
a_lweaponslot[i] = null;
arraylist.add(s);
hashmapint.put(Finger.Int(s), a_lweaponslot);
s = "none";
a_lweaponslot = new Aircraft._WeaponSlot[byte0];
a_lweaponslot[0] = null;
for(int l = 0; l < byte0; l++)
a_lweaponslot[l] = null;
arraylist.add(s);
hashmapint.put(Finger.Int(s), a_lweaponslot);
}
catch(Exception exception) { }
}
}
Структура не нарушена - можно копировать и менять названия самолёта, кокпита и количество хуков.
----------------------------------------
Вот в Як-1 так записываются хуки.
Код:
Aircraft.weaponHooksRegister(class1, new String[] {
"_MGUN01", "_MGUN02", "_CANNON01", "_ExternalDev01", "_ExternalDev02", "_ExternalDev03", "_ExternalDev04", "_ExternalDev05", "_ExternalDev06", "_ExternalRock01",
"_ExternalRock02", "_ExternalRock03", "_ExternalRock04", "_ExternalRock05", "_ExternalRock06", "_ExternalBomb01", "_ExternalBomb02"
});