In line with my previous post, here's the code in Gun.class:
String stringN = ".eff";
if (World.Sun().ToSun.z < nightSmoke) // nightSmoke converted from deg to radians
stringN = "_Night.eff";
int TrailType = 0;
String TraceTrail = super.prop.bullet[i].traceTrail;
String TraceTrail2 = super.prop.bullet[i].traceTrail2;
if(actor != World.getPlayerAircraft()) //all actors except player
{
if(actor instanceof Aircraft)
TrailType = 1; //AI planes (and player when 2D smoke used)
else
TrailType = 4; //ground weapons
}
else //if player
{
if (Config.cur.ini.get("Mods", "TracerSmokePlayer3D", 0F) == 1F) //3D smokes substitutuion enabled
TrailType = 2; //PLAYER plane 3D SUBSTITUTION
else
if (Config.cur.ini.get("Mods", "TracerSmokePlayer3D", 0F) == 2F) //2D/3D smokes mix enabled
TrailType = 3; //PLAYER plane 2D/3D MIX
else
TrailType = 1; //PLAYER plane 2D
}
switch(TrailType)
{
case 1: // '\001' //2D effects for all AI planes, and PLAYER if 3D smokes not selected
default:
if(TraceTrail.equalsIgnoreCase("Effects/Smokes/SmokeBlack_BuletteTrail.eff")) //larger calibres, generally 20mm+
TraceTrail = "Effects/Smokes/SmokeBlack_BuletteTrail" + stringN;
else
if(TraceTrail.equalsIgnoreCase("Effects/Smokes/SmokeBlack_BuletteTrail2.eff")) //smaller calibres, generally <20mm
TraceTrail = "Effects/Smokes/SmokeBlack_BuletteTrail2" + stringN;
else
if(TraceTrail.equalsIgnoreCase("3DO/Effects/Tracers/TrailCurved.eff")) //generally the more strongly spiralling smoke
TraceTrail = "3DO/Effects/Tracers/TrailCurved" + stringN;
else
if(TraceTrail.equalsIgnoreCase("3DO/Effects/Tracers/TrailThin.eff")) //used by AI only?, mostly surface weapons; in ORIGINAL FOLDER - perhaps this can be deleted...
TraceTrail = "3DO/Effects/Tracers/TrailThin" + stringN;
else
if(TraceTrail.equalsIgnoreCase("3DO/Effects/TEXTURES/fumeefine.eff")) //used by only 1 class: MGunBrowningnew50k
TraceTrail = "3DO/Effects/TEXTURES/fumeefine" + stringN;
else
if(TraceTrail.equalsIgnoreCase("Effects/Smokes/Thirties_BulletTrail.eff")) //used by only 2 classes: MGunBrowning303kwpzl, MGunBrowning303scpzl
TraceTrail = "Effects/Smokes/Thirties_BulletTrail" + stringN;
bullet.effTrail = Eff3DActor.NewPosMove(super.pos.getAbs(), 1.0F, TraceTrail, -1F);
break;
case 2: // '\002' //3D effects SUBSTITUTING 2D for PLAYER ONLY (does not use new property TraceTrail2)
if(TraceTrail.equalsIgnoreCase("Effects/Smokes/SmokeBlack_BuletteTrail.eff")) //larger calibres, generally 20mm+
TraceTrail = "3DO/Effects/Tracer_Smokes_3D/SmokeBlack_BuletteTrail_3D.eff";
else
if(TraceTrail.equalsIgnoreCase("Effects/Smokes/SmokeBlack_BuletteTrail2.eff")) //smaller calibres, generally <20mm
TraceTrail = "3DO/Effects/Tracer_Smokes_3D/SmokeBlack_BuletteTrail2_3D.eff";
else
if(TraceTrail.equalsIgnoreCase("3DO/Effects/Tracers/TrailCurved.eff")) //generally the more strongly spiralling smoke
TraceTrail = "3DO/Effects/Tracer_Smokes_3D/TrailCurved_3D.eff";
else
if(TraceTrail.equalsIgnoreCase("3DO/Effects/Tracers/TrailThin.eff")) //used by AI only?, mostly surface weapons; in ORIGINAL FOLDER - perhaps this can be deleted...
TraceTrail = "3DO/Effects/Tracers/TrailThin" + stringN;
else
if(TraceTrail.equalsIgnoreCase("3DO/Effects/TEXTURES/fumeefine.eff")) //used by only 1 class: MGunBrowningnew50k
TraceTrail = "3DO/Effects/Tracer_Smokes_3D/fumeefine_3D.eff";
else
if(TraceTrail.equalsIgnoreCase("Effects/Smokes/Thirties_BulletTrail.eff")) //used by only 2 classes: MGunBrowning303kwpzl, MGunBrowning303scpzl
TraceTrail = "3DO/Effects/Tracer_Smokes_3D/Thirties_BulletTrail_3D.eff";
bullet.effTrail = Eff3DActor.NewPosMove(super.pos.getAbs(), 1.0F, TraceTrail, -1F);
break;
case 3: // '\002' //3D effects MIXED with 2D for PLAYER ONLY (uses new property TraceTrail2)
if(TraceTrail.equalsIgnoreCase("Effects/Smokes/SmokeBlack_BuletteTrail.eff")) //larger calibres, generally 20mm+
{
TraceTrail = "3DO/Effects/Tracer_Smokes_2D_3D/SmokeBlack_BuletteTrail" + stringN;
TraceTrail2 = "3DO/Effects/Tracer_Smokes_2D_3D/SmokeBlack_BuletteTrail_3D.eff";
}
else
if(TraceTrail.equalsIgnoreCase("Effects/Smokes/SmokeBlack_BuletteTrail2.eff")) //smaller calibres, generally <20mm
{
TraceTrail = "3DO/Effects/Tracer_Smokes_2D_3D/SmokeBlack_BuletteTrail2" + stringN;
TraceTrail2 = "3DO/Effects/Tracer_Smokes_2D_3D/SmokeBlack_BuletteTrail2_3D.eff";
}
else
if(TraceTrail.equalsIgnoreCase("3DO/Effects/Tracers/TrailCurved.eff")) //generally the more strongly spiralling smoke
{
TraceTrail = "3DO/Effects/Tracer_Smokes_2D_3D/Tracers/TrailCurved" + stringN;
TraceTrail2 = "3DO/Effects/Tracer_Smokes_2D_3D/Tracers/TrailCurved_3D.eff";
}
else
if(TraceTrail.equalsIgnoreCase("3DO/Effects/Tracers/TrailThin.eff")) //used by AI only?, mostly surface weapons; in ORIGINAL FOLDER - perhaps this can be deleted...
TraceTrail = "3DO/Effects/Tracers/TrailThin" + stringN;
else
if(TraceTrail.equalsIgnoreCase("3DO/Effects/TEXTURES/fumeefine.eff")) //used by only 1 class: MGunBrowningnew50k
{
TraceTrail = "3DO/Effects/Tracer_Smokes_2D_3D/fumeefine" + stringN;
TraceTrail2 = "3DO/Effects/Tracer_Smokes_2D_3D/fumeefine_3D.eff";
}
else
if(TraceTrail.equalsIgnoreCase("Effects/Smokes/Thirties_BulletTrail.eff")) //used by only 2 classes: MGunBrowning303kwpzl, MGunBrowning303scpzl
{
TraceTrail = "3DO/Effects/Tracer_Smokes_2D_3D/Thirties_BulletTrail" + stringN;
TraceTrail2 = "3DO/Effects/Tracer_Smokes_2D_3D/Thirties_BulletTrail_3D.eff";
}
bullet.effTrail = Eff3DActor.NewPosMove(super.pos.getAbs(), 1.0F, TraceTrail, -1F);
if(super.prop.bullet[i].traceTrail2 != null) //needed when a class does not have the new TraceTrail2 property included!
bullet.effTrail2 = Eff3DActor.NewPosMove(super.pos.getAbs(), 1.0F, TraceTrail2, -1F);
break;
case 4: // '\0043' //ground weapons
TraceTrail = "3DO/Effects/Tracers/TrailThinLow" + stringN; //to make ALL surface weapon trails this low-visibility smoke; in ORIGINAL FOLDER
bullet.effTrail = Eff3DActor.NewPosMove(super.pos.getAbs(), 1.0F, TraceTrail, -1F);
break;
}