Adapting to 4.09 would be a mighty task, I think; requiring to carefully alter multiple classes. Compare the following, from Aircraft.class in B.A.T. 4.0, and likely the same as in 4.12:
public void prepareCamouflage()
{
String s = getPropertyMesh(getClass(), _loadingCountry);
prepareMeshCamouflage(s, hierMesh(), getClass(), getRegiment());
}
public static void prepareMeshCamouflage(String s, HierMesh hiermesh, Class class1, Regiment regiment)
{
prepareMeshCamouflage(s, hiermesh, null, class1, regiment);
}
public static void prepareMeshCamouflage(String s, HierMesh hiermesh, String s1, Class class1, Regiment regiment)
{
prepareMeshCamouflage(s, hiermesh, s1, null, class1, regiment);
}
public static void prepareMeshCamouflage(String s, HierMesh hiermesh, String s1, Mat amat[], Class class1, Regiment regiment)
{
if(!Config.isUSE_RENDER())
return;
String s2 = s.substring(0, s.lastIndexOf('/') + 1);
String s3 = "";
if(class1 != null)
try
{
Method method = class1.getMethod("getSkinPrefix", new Class[] {
java.lang.String.class, com.maddox.il2.ai.Regiment.class
});
s3 = (String)method.invoke(null, new Object[] {
new String(s), regiment
});
}
catch(Exception exception)
{
System.out.println(exception.getMessage());
exception.printStackTrace();
}
if(s1 == null)
{
String s4;
switch(World.cur().camouflage)
{
case 0: // '\0'
s4 = "summer";
break;
case 1: // '\001'
s4 = "winter";
break;
case 2: // '\002'
s4 = "desert";
break;
case 3: // '\003'
s4 = "pacific";
break;
case 4: // '\004'
s4 = "eto";
break;
case 5: // '\005'
s4 = "mto";
break;
case 6: // '\006'
s4 = "cbi";
break;
default:
s4 = "summer";
break;
}
String s5 = s3 + s4;
if(!existSFSFile(s2 + s5 + "/skin1o.tga"))
if(World.cur().camouflage == 5)
{
s5 = s3 + "desert";
if(!existSFSFile(s2 + s5 + "/skin1o.tga"))
s5 = s4;
if(!existSFSFile(s2 + s5 + "/skin1o.tga"))
s5 = "desert";
if(!existSFSFile(s2 + s5 + "/skin1o.tga"))
s5 = "summer";
if(!existSFSFile(s2 + s5 + "/skin1o.tga"))
return;
} else
{
s5 = s3 + "summer";
if(!existSFSFile(s2 + s5 + "/skin1o.tga"))
s5 = s4;
if(!existSFSFile(s2 + s5 + "/skin1o.tga"))
s5 = "summer";
if(!existSFSFile(s2 + s5 + "/skin1o.tga"))
return;
}
s1 = s2 + s5;
}
String as[] = {
s1 + "/skin1o.tga", s1 + "/skin1p.tga", s1 + "/skin1q.tga"
};
int ai[] = new int[4];
for(int i = 0; i < _skinMat.length; i++)
{
int j = hiermesh.materialFind(_skinMat[i]);
if(j < 0)
continue;
Mat mat = hiermesh.material(j);
boolean flag = false;
label0:
for(int k = 0; k < 4; k++)
{
ai[k] = -1;
if(!mat.isValidLayer(k))
continue;
mat.setLayer(k);
String s7 = mat.get('\0');
int l = 0;
do
{
if(l >= 3)
continue label0;
if(s7.regionMatches(true, s7.length() - 10, _curSkin[l], 0, 10))
{
ai[k] = l;
flag = true;
continue label0;
}
l++;
} while(true);
}
if(!flag)
continue;
String s6 = s1 + "/" + _skinMat[i] + ".mat";
Mat mat1;
if(FObj.Exist(s6))
{
mat1 = (Mat)FObj.Get(s6);
} else
{
mat1 = (Mat)mat.Clone();
mat1.Rename(s6);
for(int i1 = 0; i1 < 4; i1++)
if(ai[i1] >= 0)
{
mat1.setLayer(i1);
mat1.set('\0', as[ai[i1]]);
}
}
if(amat != null)
{
for(int j1 = 0; j1 < 4; j1++)
if(ai[j1] >= 0)
amat[ai[j1]] = mat1;
}
hiermesh.materialReplace(_skinMat[i], mat1);
}
}
public static String getSkinPrefix(String s, Regiment regiment)
{
return "";
}