OK. In com.maddox.il2.objects.vehicles.stationary.CandC.class we have the following three classes which control the C&C arty barrage and fire effects.
===============================================================================
For the arty barrage:
public static class BoxUnit extends CandCGeneric
{
public boolean danger()
{
super.pos.getAbs(point3d);
Orient orient = new Orient();
super.pos.getAbs(point3d, orient);
List list = Engine.targets();
int i = list.size();
for(int j = 0; j < i; j++)
{
Actor actor = (Actor)list.get(j);
if(actor.pos.getAbsPoint().distance(point3d) < 10000D && actor.getArmy() != super.myArmy)
{
String s = "weapon.bomb_std";
point3d.x += TrueRandom.nextDouble(-500D, 500D);
point3d.y += TrueRandom.nextDouble(-500D, 500D);
point3d.z += ((Tuple3d) (actor.pos.getAbsPoint())).z + TrueRandom.nextDouble(-150D, 150D);
Explosions.AirFlak(point3d, 1);
MsgExplosion.send(this, s, point3d, getOwner(), 0.0F, 0.9F, 0, 30F);
l.set(point3d, orient);
Eff3DActor eff3dactor = Eff3DActor.New(l, 1.0F, "effects/Explodes/Air/Zenitka/Germ_88mm/Burn.eff", 1.0F);
eff3dactor.postDestroy(Time.current() + 1500L);
LightPointActor lightpointactor = new LightPointActor(new LightPointWorld(), new Point3d());
lightpointactor.light.setColor(1.0F, 0.9F, 0.5F);
lightpointactor.light.setEmit(1.0F, 300F);
((Actor) (eff3dactor)).draw.lightMap().put("light", lightpointactor);
super.setTimer(15);
}
}
return true;
}
private Point3d point3d;
private static Loc l = new Loc();
public BoxUnit()
{
point3d = new Point3d();
super.Timer1 = super.Timer2 = 0.1F;
}
}
The Burn.eff is used only as a 'reference' for the lightpointactor, the latter being the illumination source which lights up the immediate area. It is set to last 1.5 seconds, which is an eternity, and over a range of 300m, which is rather far. I want to lower the duration to be of about the same as for the flash effect, or ~0.1 second. The illumination range could be reduced, too. I see that the bursts are set to occur within 150m above and below the object's placement. The AirFlak method in Explosions.class sets the burst effects.
===============================================================================
For the larger fires:
public static class FireUnit extends CandCGeneric
{
public boolean danger()
{
boolean flag = false;
super.pos.getAbs(point3d);
List list = Engine.targets();
int i = list.size();
for(int j = 0; j < i; j++)
{
Actor actor = (Actor)list.get(j);
if(!flag && actor.pos.getAbsPoint().distance(point3d) < 10000D && (actor instanceof TypeBomber) && actor.getArmy() != super.myArmy)
{
int k = TrueRandom.nextInt(500);
int l = k - 250;
k = TrueRandom.nextInt(500);
int i1 = k - 250;
Eff3DActor.New(this, null, new Loc(l, i1, 0.0D, 0.0F, 90F, 0.0F), 1.0F, "Effects/Smokes/CityFire.eff", 600F);
flag = true;
int j1 = TrueRandom.nextInt(10);
wait = (float)(1.0D + (double)j1 * 0.10000000000000001D);
}
}
return true;
}
private float wait;
private Point3d point3d;
public FireUnit()
{
point3d = new Point3d();
wait = 1.0F;
super.Timer1 = super.Timer2 = wait;
}
}
I'm not sure how the number of fires is determined, but it seems to depend on a list count determined in class Engine.targets. Each fire lasts 600 seconds. There is a wait time, presumably for generation of a replacement fire, that randomly lasts 1-11 seconds.
===============================================================================
For the smaller fires:
public static class BombUnit extends CandCGeneric
{
public boolean danger()
{
super.pos.getAbs(point3d);
Aircraft aircraft = CandC.GetNearestEnemy(this, 10000F, 9);
if(counter > 10)
{
counter = 0;
startpoint.set(((Tuple3d) (point3d)).x + TrueRandom.nextDouble(-500D, 500D), ((Tuple3d) (point3d)).y + TrueRandom.nextDouble(-500D, 500D), ((Tuple3d) (point3d)).z);
}
if(aircraft != null && (aircraft instanceof TypeBomber) && aircraft.getArmy() != super.myArmy)
{
counter++;
String s = "weapon.bomb_std";
startpoint.x += TrueRandom.nextInt(40) - 20;
startpoint.y += TrueRandom.nextInt(40) - 20;
Explosions.generate(this, startpoint, 7F, 0, 30F, !Mission.isNet());
startpoint.z = World.land().HQ(((Tuple3d) (startpoint)).x, ((Tuple3d) (startpoint)).y);
MsgExplosion.send(this, s, startpoint, getOwner(), 0.0F, 7F, 0, 30F);
Engine.land();
int i = Landscape.getPixelMapT(Engine.land().WORLD2PIXX(((Tuple3d) (startpoint)).x), Engine.land().WORLD2PIXY(((Tuple3d) (startpoint)).y));
if(firecounter < 100 && i >= 16 && i < 20)
{
Eff3DActor.New(null, null, new Loc(((Tuple3d) (startpoint)).x, ((Tuple3d) (startpoint)).y, ((Tuple3d) (startpoint)).z + 5D, 0.0F, 90F, 0.0F), 1.0F, "Effects/Smokes/CityFire3.eff", 300F);
firecounter++;
}
super.setTimer(15);
}
return true;
}
private Point3d point3d;
private static Point3d startpoint = new Point3d();
private int counter;
private int firecounter;
public BombUnit()
{
point3d = new Point3d();
counter = 11;
firecounter = 0;
super.Timer1 = super.Timer2 = 0.05F;
}
}
The placement of these fires would seem to be limited to map_T pixel greyscale values of 16-19 (I guess they correspond to the the load.ini City0 to City3 texture slots). Looks like up to 100 fires can exist, and each lasts for 300 seconds. They are also set to lie 5m above the object's elevation.