Special Aircraft Service

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1] 2   Go Down

Author Topic: Something I haven't seen before - Yellow Smoke?  (Read 633 times)

0 Members and 1 Guest are viewing this topic.

genXgamer

  • member
  • Offline Offline
  • Posts: 1332
Something I haven't seen before - Yellow Smoke?
« on: June 06, 2023, 03:59:03 PM »

While play testing a mission last night I noticed what appeared to be yellow smoke coming from a damaged aircraft.
Some may say this is common and been happening since year dot, but I've never noticed it before during my short time playing this sim.

I should point out that while troubleshooting an issue the other week I removed WxTech's Effects and haven't bothered replacing it yet, so what you are seeing is stock B.A.T.


Logged
Go in quickly - Punch hard - Get out!

ZtheE

  • Modder
  • member
  • Offline Offline
  • Posts: 473
  • William
    • Instagram
Re: Something I haven't seen before - Yellow Smoke?
« Reply #1 on: June 06, 2023, 05:05:31 PM »

It might be fuel but it seems a little too yellow
Logged
I got my BAT license from a cereal box and I finally have a decent PC

WxTech

  • Modder
  • member
  • Offline Offline
  • Posts: 6013
Re: Something I haven't seen before - Yellow Smoke?
« Reply #2 on: June 06, 2023, 07:29:12 PM »

Almost certainly fuel leak smoke. Normally this is represented with an essentially colorless texture. I do give it a subtle yellowish hue, but nowhere close to this.

If you run the Selector in dump mode, after ensuring the relevant files are not already I the dump folder if you're run it before and not deleted, the .eff, .mat and .tga files will tell us the story. The effect name is RedLeakTSPD.eff.
Logged
Great minds discuss ideas. Average minds discuss events. Small minds discuss people. - Hyman Rickover (but probably predating his use.)

EHood

  • Supporter
  • member
  • Offline Offline
  • Posts: 603
Re: Something I haven't seen before - Yellow Smoke?
« Reply #3 on: June 07, 2023, 12:17:09 AM »

I've always thought that the yellowish "smoke" is antifreeze pouring out of hits on the engine cooling system. Sometimes, in zB Great Battles, the substance has a greenish hue.
Logged
A ya tsi-tsalagi.

WxTech

  • Modder
  • member
  • Offline Offline
  • Posts: 6013
Re: Something I haven't seen before - Yellow Smoke?
« Reply #4 on: June 07, 2023, 12:37:40 AM »

In an aircraft's hitBone method in the aircraft class, there is no specification for coolant damage representative of glycol/water. The nearest is oil, and the stock smoke effect has the texture as very dark or black. I have it as a pale bluish, if for no other reason than to distinguish from other damage.
Logged
Great minds discuss ideas. Average minds discuss events. Small minds discuss people. - Hyman Rickover (but probably predating his use.)

Kopfdorfer

  • member
  • Offline Offline
  • Posts: 2162
  • PULVERIZER
Re: Something I haven't seen before - Yellow Smoke?
« Reply #5 on: June 07, 2023, 06:34:22 AM »

If I am not mistaken , coolant ( glycol ) leaks of the period appeared
as puffy pure white trails , presumably as they were boiling fluids as they
leaked into the cold atmosphere ( especially at high altitudes - oh my ,
now I have brought the variable of altitude into the mix here )
where they instantly vapourized.
Some scientist please step in and correct me if I am wrong here.

Kopfdorfer
Logged

Frankiek

  • SAS Team
  • member
  • Offline Offline
  • Posts: 2878
Re: Something I haven't seen before - Yellow Smoke?
« Reply #6 on: June 07, 2023, 07:00:18 AM »

if you tell us the plane and map we can try to replicate the effect
Logged

WxTech

  • Modder
  • member
  • Offline Offline
  • Posts: 6013
Re: Something I haven't seen before - Yellow Smoke?
« Reply #7 on: June 07, 2023, 08:11:47 AM »

For aircraft generated effects, there is no dependence on temperature, altitude, season, time of day, weather setting or map CAMOUFLAGE. A particular effect for oil damage, engine damage or fuel tank damage is the same under all conditions. For instance, there is but a single pair of oil smokes invoked together in all cases and for all planes; a SPD and a TSPD variant, for which the .eff , .mat and .tga files are fixed.

At least for the classes controlling this between 4.09 through B.A.T. 4.2. After going through this stuff over scores (if not hundreds) of hours since delving into the Java nearly 4 years ago, I've seen no indication of such dependencies.  ;)

An odd change like this suggests the presence of another effect mod, or remnants still left over after a deletion. It only takes the presence of a shared .mat or .tga lurking somewhere (in the expected folder sought by the .eff) to throw such a wrench into the works.
Logged
Great minds discuss ideas. Average minds discuss events. Small minds discuss people. - Hyman Rickover (but probably predating his use.)

EHood

  • Supporter
  • member
  • Offline Offline
  • Posts: 603
Re: Something I haven't seen before - Yellow Smoke?
« Reply #8 on: June 07, 2023, 12:46:48 PM »

Many thanks, Kopfdorfer and WxTech. I saw the yellow and imagined that, wow, that guy's losing antifreeze, so his engine should be overheating very soon. It is interesting, if a tad disappointing, to know that the coloration is a bit of a fluke lol.

I also recall, when the He 100 was added to BAT, thinking about damage models for that machine. Great clouds of steam would result from hits on the outer wing panels, and hits to the fuselage spine and empennage would have resulted in the release of alcohol fumes. The He 100 would have had an interesting IR signature as well.
Logged
A ya tsi-tsalagi.

WxTech

  • Modder
  • member
  • Offline Offline
  • Posts: 6013
Re: Something I haven't seen before - Yellow Smoke?
« Reply #9 on: June 07, 2023, 02:26:58 PM »

That description of the He-100 makes me wonder if it might have made use of an unconventional effect, such as, e.g., the steam emitted by the Me-163, or some such. I've never shot one up to see. ;) A perusal of the plane's class would reveal if something like this was done. I'm curious now, and will check...

But the P-40 definitely uses the good old usual effects expected--nothing exotic.

As suggested, if still occurring, running the Selector in dump mode and playing until the effect is generated (to be sure it gets written to the output folder) and then checking the dumped effects in dump/3do/Effects/Aircraft/, and the related resources in the textures folder, should tell the tale. Just be sure the folders are empty if any dumps were done previously.
Logged
Great minds discuss ideas. Average minds discuss events. Small minds discuss people. - Hyman Rickover (but probably predating his use.)

EHood

  • Supporter
  • member
  • Offline Offline
  • Posts: 603
Re: Something I haven't seen before - Yellow Smoke?
« Reply #10 on: June 07, 2023, 05:40:37 PM »





These are tarted-up versions of some of my better source drawings of the He 100 A, which is too often still referred to by its propaganda moniker, He 100 D. The pink areas in the fuselage views show where two of the four panels for the alcohol-based oil cooling system were located. The other two were on the horizontal stabilizers. The fixed portion of each stabilizer was covered by a single cooling panel that ran from the top of the stabilizer spar to the bottom of the spar. That's right; most He 100s did not have separate leading edge panels on the stabilizers.

The blue areas in the wing top plan views show the extent of the engine steam/surface cooling panels. Note that the pattern on the right wing differs from that on the left, this because of a reserve water tank, marked "B," situated in the right wing. "C" indicates the hollow wing leading edges. Water condensed by the surface cooling panels was channeled via the wing leading edges right back to the engine. In earlier British designs, including the Goshawk projects as well as the original design for the Spitfire, these leading edges were known as "hot wells." "A" marks the fuel tanks. This aircraft had long legs. This drawing also shows the 3 mm gap between the inner and outer skins of the steam-cooling panels,
Logged
A ya tsi-tsalagi.

WxTech

  • Modder
  • member
  • Offline Offline
  • Posts: 6013
Re: Something I haven't seen before - Yellow Smoke?
« Reply #11 on: June 07, 2023, 07:56:41 PM »

At the risk of thread derail, here's the interesting stuff regarding the He-100. I present below the full contents of the general, fundamantal class for the He-100 (there's a smaller class specifically for the He-100D which builds upon this one.)

The only stand-out bit here is that there is an explosion event tied to the tail. Otherwise the contents are conventional enough; I see nothing suggesting some unique effect related to the cooling system. The plane model's damage hooks may have some placed close together, resulting in a combination of effects that make for an extra dense appearance when some number of effects tied to them are active together.

Anyway, this is just a very quick look at things. The P-40 is more conventional and a bit simpler, with no surprises waiting.  ;)



Highlighting the explosion tied to the He-100's tail:

Code: [Select]
  public void msgExplosion(Explosion explosion)
    {
        setExplosion(explosion);
        if(explosion.chunkName != null && explosion.power > 0.0F && explosion.chunkName.startsWith("Tail1"))
        {
            if(World.Rnd().nextFloat(0.0F, 0.038F) < explosion.power)
                ((FlightModelMain) (super.FM)).AS.setControlsDamage(explosion.initiator, 1);
            if(World.Rnd().nextFloat(0.0F, 0.042F) < explosion.power)
                ((FlightModelMain) (super.FM)).AS.setControlsDamage(explosion.initiator, 2);
        }
        super.msgExplosion(explosion);
    }





The full He-100 'base' class:

Code: [Select]
package com.maddox.il2.objects.air;

import com.maddox.JGP.Point3d;
import com.maddox.JGP.Tuple3d;
import com.maddox.il2.ai.*;
import com.maddox.il2.engine.*;
import com.maddox.il2.fm.*;
import com.maddox.il2.objects.sounds.SndAircraft;
import com.maddox.rts.Property;
import java.security.SecureRandom;
import java.util.Random;

// Referenced classes of package com.maddox.il2.objects.air:
//            Scheme1, TypeFighter, PaintScheme, Aircraft,
//            AircraftLH

public abstract class HE_1xx extends Scheme1
    implements TypeFighter
{

    public HE_1xx()
    {
        trimElevator = 0.0F;
        bHasElevatorControl = true;
        X = 1.0F;
        GlassState = 0;
        s17 = s18 = 0.15F;
        s31 = s32 = 0.35F;
        SecureRandom secRandom = new SecureRandom();
        secRandom.setSeed(System.currentTimeMillis());
        RangeRandom rr = new RangeRandom(secRandom.nextLong());
        for(int i = 0; i < rndgear.length; i++)
            rndgear[i] = rr.nextFloat(0.0F, 0.15F);

    }

    public float getEyeLevelCorrection()
    {
        return 0.1F;
    }

    public void moveWheelSink()
    {
        resetYPRmodifier();
        Aircraft.xyz[2] = Aircraft.cvt(((FlightModelMain) (super.FM)).Gears.gWheelSinking[0], 0.0F, 0.3F, 0.0F, 0.3F);
        hierMesh().chunkSetLocate("GearL99_D0", Aircraft.xyz, Aircraft.ypr);
        Aircraft.xyz[2] = Aircraft.cvt(((FlightModelMain) (super.FM)).Gears.gWheelSinking[1], 0.0F, 0.3F, 0.0F, 0.3F);
        hierMesh().chunkSetLocate("GearR99_D0", Aircraft.xyz, Aircraft.ypr);
    }

    public void doWoundPilot(int i, float f)
    {
    }

    public void doMurderPilot(int i)
    {
        switch(i)
        {
        case 0: // '\0'
            hierMesh().chunkVisible("Pilot1_D0", false);
            hierMesh().chunkVisible("Head1_D0", false);
            hierMesh().chunkVisible("Pilot1_D1", true);
            hierMesh().chunkVisible("HMask1_D0", false);
            if(!((FlightModelMain) (super.FM)).AS.bIsAboutToBailout && World.cur().isHighGore())
            {
                if(hierMesh().isChunkVisible("Blister1_D0"))
                    hierMesh().chunkVisible("Gore1_D0", true);
                hierMesh().chunkVisible("Gore2_D0", true);
            }
            break;
        }
    }

    public boolean cut(String s)
    {
        if(s.startsWith("Tail1"))
            ((FlightModelMain) (super.FM)).AS.hitTank(this, 2, 100);
        return super.cut(s);
    }

    public void rareAction(float f, boolean flag)
    {
        super.rareAction(f, flag);
        if(flag && ((FlightModelMain) (super.FM)).AS.astateTankStates[0] > 5)
            ((FlightModelMain) (super.FM)).AS.repairTank(0);
        if(super.FM.getAltitude() < 3000F)
            hierMesh().chunkVisible("HMask1_D0", false);
        else
            hierMesh().chunkVisible("HMask1_D0", hierMesh().isChunkVisible("Head1_D0"));
    }

    public void update(float f)
    {
        super.update(f);
        CombustionFlame();
        if(!getOp(31) || !getOp(32))
            ((FlightModelMain) (super.FM)).CT.trimAileron = ((((FlightModelMain) (super.FM)).CT.ElevatorControl * (s32 - s31) + ((FlightModelMain) (super.FM)).CT.trimElevator * (s18 - s17)) * ((FlightModelMain) (super.FM)).SensPitch) / 3F;
        if(!bHasElevatorControl)
            ((FlightModelMain) (super.FM)).CT.ElevatorControl = 0.0F;
        if(trimElevator != ((FlightModelMain) (super.FM)).CT.trimElevator)
        {
            trimElevator = ((FlightModelMain) (super.FM)).CT.trimElevator;
            hierMesh().chunkSetAngles("StabL_D0", 0.0F, 0.0F, -16F * trimElevator);
            hierMesh().chunkSetAngles("StabR_D0", 0.0F, 0.0F, -16F * trimElevator);
        }
    }

    protected void moveElevator(float f)
    {
        f -= trimElevator;
        hierMesh().chunkSetAngles("VatorL_D0", 0.0F, -30F * f, 0.0F);
        hierMesh().chunkSetAngles("VatorR_D0", 0.0F, -30F * f, 0.0F);
    }

    private void reflectGlassState(int i)
    {
        GlassState |= i;
        switch(GlassState & 3)
        {
        case 1: // '\001'
            hierMesh().materialReplace("Glass2", "ZBulletsHoles");
            break;

        case 2: // '\002'
            hierMesh().materialReplace("Glass2", "GlassOil");
            break;

        case 3: // '\003'
            hierMesh().materialReplace("Glass2", "GlassOilHoles");
            break;
        }
        switch(GlassState & 0xc)
        {
        case 4: // '\004'
            hierMesh().materialReplace("GlassW", "ZBulletsHoles");
            break;

        case 8: // '\b'
            hierMesh().materialReplace("GlassW", "Wounded");
            hierMesh().chunkVisible("Gore2_D0", true);
            break;

        case 12: // '\f'
            hierMesh().materialReplace("GlassW", "WoundedHoles");
            hierMesh().chunkVisible("Gore2_D0", true);
            break;
        }
    }

    protected void hitBone(String s, Shot shot, Point3d point3d)
    {
        if(s.startsWith("xx"))
        {
            if(s.startsWith("xxarmor"))
            {
                Aircraft.debugprintln(this, "*** Armor: Hit..");
                if(s.endsWith("p1"))
                {
                    getEnergyPastArmor(World.Rnd().nextFloat(20F, 30F), shot);
                    ((FlightModelMain) (super.FM)).AS.setCockpitState(shot.initiator, ((FlightModelMain) (super.FM)).AS.astateCockpitState | 2);
                    reflectGlassState(5);
                    Aircraft.debugprintln(this, "*** Armor Glass: Hit..");
                    if(shot.power <= 0.0F)
                    {
                        Aircraft.debugprintln(this, "*** Armor Glass: Bullet Stopped..");
                        if(World.Rnd().nextFloat() < 0.5F)
                            doRicochetBack(shot);
                    }
                } else
                if(s.endsWith("p2"))
                    getEnergyPastArmor(0.5F, shot);
                else
                if(s.endsWith("p3"))
                {
                    if(((Tuple3d) (point3d)).z < -0.27000000000000002D)
                        getEnergyPastArmor(4.0999999999999996D / (Math.abs(((Tuple3d) (Aircraft.v1)).z) + 1.0000000000000001E-005D), shot);
                    else
                        getEnergyPastArmor(8.0999999999999996D / (Math.abs(((Tuple3d) (Aircraft.v1)).x) + 1.0000000000000001E-005D), shot);
                } else
                if(s.endsWith("p4"))
                    getEnergyPastArmor(9D / (Math.abs(((Tuple3d) (Aircraft.v1)).z) + 1.0000000000000001E-005D), shot);
                else
                if(s.endsWith("p5"))
                    getEnergyPastArmor(9D / (Math.abs(((Tuple3d) (Aircraft.v1)).x) + 1.0000000000000001E-005D), shot);
                else
                if(s.endsWith("p6"))
                    getEnergyPastArmor(9D / (Math.abs(((Tuple3d) (Aircraft.v1)).x) + 1.0000000000000001E-005D), shot);
                else
                if(s.endsWith("a1"))
                {
                    if(World.Rnd().nextFloat() < 0.5F)
                        shot.powerType = 0;
                    getEnergyPastArmor(World.Rnd().nextFloat(1.0F, 3F), shot);
                }
                return;
            }
            if(s.startsWith("xxcontrols"))
            {
                int i = s.charAt(10) - 48;
                switch(i)
                {
                default:
                    break;

                case 1: // '\001'
                case 4: // '\004'
                    if(getEnergyPastArmor(0.1F, shot) > 0.0F)
                    {
                        ((FlightModelMain) (super.FM)).AS.setControlsDamage(shot.initiator, 0);
                        Aircraft.debugprintln(this, "*** Aileron Controls: Control Crank Destroyed..");
                    }
                    break;

                case 2: // '\002'
                case 3: // '\003'
                    if(getEnergyPastArmor(0.12F, shot) > 0.0F && World.Rnd().nextFloat() < 0.1F)
                    {
                        ((FlightModelMain) (super.FM)).AS.setControlsDamage(shot.initiator, 0);
                        Aircraft.debugprintln(this, "*** Aileron Controls: Disabled..");
                    }
                    break;

                case 5: // '\005'
                case 6: // '\006'
                    if(getEnergyPastArmor(0.002F, shot) > 0.0F && World.Rnd().nextFloat() < 0.1F)
                    {
                        ((FlightModelMain) (super.FM)).AS.setControlsDamage(shot.initiator, 1);
                        Aircraft.debugprintln(this, "*** Elevator Controls: Disabled / Strings Broken..");
                    }
                    break;

                case 7: // '\007'
                    if(getEnergyPastArmor(2.3F, shot) > 0.0F && World.Rnd().nextFloat() < 0.2F)
                    {
                        ((FlightModelMain) (super.FM)).AS.setControlsDamage(shot.initiator, 2);
                        Aircraft.debugprintln(this, "*** Rudder Controls: Disabled..");
                    }
                    break;

                case 8: // '\b'
                    if(getEnergyPastArmor(3.2F, shot) > 0.0F)
                    {
                        Aircraft.debugprintln(this, "*** Control Column: Hit, Controls Destroyed..");
                        ((FlightModelMain) (super.FM)).AS.setControlsDamage(shot.initiator, 2);
                        ((FlightModelMain) (super.FM)).AS.setControlsDamage(shot.initiator, 1);
                        ((FlightModelMain) (super.FM)).AS.setControlsDamage(shot.initiator, 0);
                    }
                    break;

                case 9: // '\t'
                    if(getEnergyPastArmor(0.1F, shot) > 0.0F)
                    {
                        ((FlightModelMain) (super.FM)).AS.setCockpitState(shot.initiator, ((FlightModelMain) (super.FM)).AS.astateCockpitState | 8);
                        ((FlightModelMain) (super.FM)).AS.setEngineSpecificDamage(shot.initiator, 0, 1);
                        ((FlightModelMain) (super.FM)).AS.setEngineSpecificDamage(shot.initiator, 0, 6);
                        Aircraft.debugprintln(this, "*** Throttle Quadrant: Hit, Engine Controls Disabled..");
                    }
                    break;
                }
            }
            if(s.startsWith("xxspar"))
            {
                Aircraft.debugprintln(this, "*** Spar Construction: Hit..");
                if(s.startsWith("xxspart") && chunkDamageVisible("Tail1") > 2 && getEnergyPastArmor(3.5F / (float)Math.sqrt(((Tuple3d) (Aircraft.v1)).y * ((Tuple3d) (Aircraft.v1)).y + ((Tuple3d) (Aircraft.v1)).z * ((Tuple3d) (Aircraft.v1)).z), shot) > 0.0F)
                {
                    Aircraft.debugprintln(this, "*** Tail1 Spars Broken in Half..");
                    nextDMGLevels(1, 2, "Tail1_D3", shot.initiator);
                }
                if(s.startsWith("xxsparli") && chunkDamageVisible("WingLIn") > 2 && getEnergyPastArmor(9.5F * World.Rnd().nextFloat(1.0F, 1.2F), shot) > 0.0F)
                {
                    Aircraft.debugprintln(this, "*** WingLIn Spars Damaged..");
                    nextDMGLevels(1, 2, "WingLIn_D3", shot.initiator);
                }
                if(s.startsWith("xxsparri") && chunkDamageVisible("WingRIn") > 2 && getEnergyPastArmor(9.5F * World.Rnd().nextFloat(1.0F, 1.2F), shot) > 0.0F)
                {
                    Aircraft.debugprintln(this, "*** WingRIn Spars Damaged..");
                    nextDMGLevels(1, 2, "WingRIn_D3", shot.initiator);
                }
                if(s.startsWith("xxsparlm") && chunkDamageVisible("WingLMid") > 2 && getEnergyPastArmor(9.5F * World.Rnd().nextFloat(1.0F, 1.2F), shot) > 0.0F)
                {
                    Aircraft.debugprintln(this, "*** WingLMid Spars Damaged..");
                    nextDMGLevels(1, 2, "WingLMid_D3", shot.initiator);
                }
                if(s.startsWith("xxsparrm") && chunkDamageVisible("WingRMid") > 2 && getEnergyPastArmor(9.5F * World.Rnd().nextFloat(1.0F, 1.2F), shot) > 0.0F)
                {
                    Aircraft.debugprintln(this, "*** WingRMid Spars Damaged..");
                    nextDMGLevels(1, 2, "WingRMid_D3", shot.initiator);
                }
                if(s.startsWith("xxsparlo") && chunkDamageVisible("WingLOut") > 2 && getEnergyPastArmor(9.5F * World.Rnd().nextFloat(1.0F, 1.2F), shot) > 0.0F)
                {
                    Aircraft.debugprintln(this, "*** WingLOut Spars Damaged..");
                    nextDMGLevels(1, 2, "WingLOut_D3", shot.initiator);
                }
                if(s.startsWith("xxsparro") && chunkDamageVisible("WingROut") > 2 && getEnergyPastArmor(9.5F * World.Rnd().nextFloat(1.0F, 1.2F), shot) > 0.0F)
                {
                    Aircraft.debugprintln(this, "*** WingROut Spars Damaged..");
                    nextDMGLevels(1, 2, "WingROut_D3", shot.initiator);
                }
            }
            if(s.startsWith("xxwj") && getEnergyPastArmor(12.5F, shot) > 0.0F)
                if(s.endsWith("l"))
                {
                    Aircraft.debugprintln(this, "*** WingL Console Lock Destroyed..");
                    nextDMGLevels(4, 2, "WingLIn_D" + chunkDamageVisible("WingLIn"), shot.initiator);
                } else
                {
                    Aircraft.debugprintln(this, "*** WingR Console Lock Destroyed..");
                    nextDMGLevels(4, 2, "WingRIn_D" + chunkDamageVisible("WingRIn"), shot.initiator);
                }
            if(s.startsWith("xxlock"))
            {
                Aircraft.debugprintln(this, "*** Lock Construction: Hit..");
                if(s.startsWith("xxlockr") && getEnergyPastArmor(5.5F * World.Rnd().nextFloat(1.0F, 1.2F), shot) > 0.0F)
                {
                    Aircraft.debugprintln(this, "*** Rudder Lock Shot Off..");
                    nextDMGLevels(3, 2, "Rudder1_D" + chunkDamageVisible("Rudder1"), shot.initiator);
                }
                if(s.startsWith("xxlockvl") && getEnergyPastArmor(5.5F * World.Rnd().nextFloat(1.0F, 1.2F), shot) > 0.0F)
                {
                    Aircraft.debugprintln(this, "*** VatorL Lock Shot Off..");
                    nextDMGLevels(3, 2, "VatorL_D" + chunkDamageVisible("VatorL"), shot.initiator);
                }
                if(s.startsWith("xxlockvr") && getEnergyPastArmor(5.5F * World.Rnd().nextFloat(1.0F, 1.2F), shot) > 0.0F)
                {
                    Aircraft.debugprintln(this, "*** VatorR Lock Shot Off..");
                    nextDMGLevels(3, 2, "VatorR_D" + chunkDamageVisible("VatorR"), shot.initiator);
                }
            }
            if(s.startsWith("xxeng"))
            {
                Aircraft.debugprintln(this, "*** Engine Module: Hit..");
                if(s.endsWith("pipe"))
                {
                    if(World.Rnd().nextFloat() < 0.1F && ((FlightModelMain) (super.FM)).CT.Weapons[1] != null && ((FlightModelMain) (super.FM)).CT.Weapons[1].length != 2)
                    {
                        ((FlightModelMain) (super.FM)).AS.setJamBullets(1, 0);
                        Aircraft.debugprintln(this, "*** Engine Module: Nose Nozzle Pipe Bent..");
                    }
                    getEnergyPastArmor(0.3F, shot);
                } else
                if(s.endsWith("prop"))
                {
                    if(getEnergyPastArmor(0.1F, shot) > 0.0F && World.Rnd().nextFloat() < 0.8F)
                        if(World.Rnd().nextFloat() < 0.5F)
                        {
                            ((FlightModelMain) (super.FM)).AS.setEngineSpecificDamage(shot.initiator, 0, 3);
                            Aircraft.debugprintln(this, "*** Engine Module: Prop Governor Hit, Disabled..");
                        } else
                        {
                            ((FlightModelMain) (super.FM)).AS.setEngineSpecificDamage(shot.initiator, 0, 4);
                            Aircraft.debugprintln(this, "*** Engine Module: Prop Governor Hit, Damaged..");
                        }
                } else
                if(s.endsWith("gear"))
                {
                    if(getEnergyPastArmor(4.6F, shot) > 0.0F)
                        if(World.Rnd().nextFloat() < 0.5F)
                        {
                            ((FlightModelMain) (super.FM)).EI.engines[0].setEngineStuck(shot.initiator);
                            Aircraft.debugprintln(this, "*** Engine Module: Bullet Jams Reductor Gear..");
                        } else
                        {
                            ((FlightModelMain) (super.FM)).AS.setEngineSpecificDamage(shot.initiator, 0, 3);
                            ((FlightModelMain) (super.FM)).AS.setEngineSpecificDamage(shot.initiator, 0, 4);
                            Aircraft.debugprintln(this, "*** Engine Module: Reductor Gear Damaged, Prop Governor Failed..");
                        }
                } else
                if(s.endsWith("supc"))
                {
                    if(getEnergyPastArmor(0.1F, shot) > 0.0F)
                    {
                        ((FlightModelMain) (super.FM)).AS.setEngineSpecificDamage(shot.initiator, 0, 0);
                        Aircraft.debugprintln(this, "*** Engine Module: Supercharger Disabled..");
                    }
                } else
                if(s.endsWith("feed"))
                {
                    if(getEnergyPastArmor(3.2F, shot) > 0.0F && World.Rnd().nextFloat() < 0.5F && ((FlightModelMain) (super.FM)).EI.engines[0].getPowerOutput() > 0.7F)
                    {
                        ((FlightModelMain) (super.FM)).AS.hitEngine(shot.initiator, 0, 100);
                        Aircraft.debugprintln(this, "*** Engine Module: Pressurized Fuel Line Pierced, Fuel Flamed..");
                    }
                } else
                if(s.endsWith("fuel"))
                {
                    if(getEnergyPastArmor(1.1F, shot) > 0.0F)
                    {
                        ((FlightModelMain) (super.FM)).EI.engines[0].setEngineStops(shot.initiator);
                        Aircraft.debugprintln(this, "*** Engine Module: Fuel Line Stalled, Engine Stalled..");
                    }
                } else
                if(s.endsWith("case"))
                {
                    if(getEnergyPastArmor(2.1F, shot) > 0.0F)
                    {
                        if(World.Rnd().nextFloat() < shot.power / 175000F)
                        {
                            ((FlightModelMain) (super.FM)).AS.setEngineStuck(shot.initiator, 0);
                            Aircraft.debugprintln(this, "*** Engine Module: Bullet Jams Crank Ball Bearing..");
                        }
                        if(World.Rnd().nextFloat() < shot.power / 50000F)
                        {
                            ((FlightModelMain) (super.FM)).AS.hitEngine(shot.initiator, 0, 2);
                            Aircraft.debugprintln(this, "*** Engine Module: Crank Case Hit, Readyness Reduced to " + ((FlightModelMain) (super.FM)).EI.engines[0].getReadyness() + "..");
                        }
                        ((FlightModelMain) (super.FM)).EI.engines[0].setReadyness(shot.initiator, ((FlightModelMain) (super.FM)).EI.engines[0].getReadyness() - World.Rnd().nextFloat(0.0F, shot.power / 48000F));
                        Aircraft.debugprintln(this, "*** Engine Module: Crank Case Hit, Readyness Reduced to " + ((FlightModelMain) (super.FM)).EI.engines[0].getReadyness() + "..");
                    }
                    getEnergyPastArmor(22.5F, shot);
                } else
                if(s.startsWith("xxeng1cyl"))
                {
                    if(getEnergyPastArmor(0.1F, shot) > 0.0F && World.Rnd().nextFloat() < ((FlightModelMain) (super.FM)).EI.engines[0].getCylindersRatio() * 1.75F)
                    {
                        ((FlightModelMain) (super.FM)).EI.engines[0].setCyliderKnockOut(shot.initiator, World.Rnd().nextInt(1, (int)(shot.power / 4800F)));
                        Aircraft.debugprintln(this, "*** Engine Module: Cylinders Hit, " + ((FlightModelMain) (super.FM)).EI.engines[0].getCylindersOperable() + "/" + ((FlightModelMain) (super.FM)).EI.engines[0].getCylinders() + " Left..");
                        if(World.Rnd().nextFloat() < shot.power / 24000F)
                        {
                            ((FlightModelMain) (super.FM)).AS.hitEngine(shot.initiator, 0, 3);
                            Aircraft.debugprintln(this, "*** Engine Module: Cylinders Hit, Engine Fires..");
                        }
                        if(World.Rnd().nextFloat() < 0.01F)
                        {
                            ((FlightModelMain) (super.FM)).AS.setEngineStuck(shot.initiator, 0);
                            Aircraft.debugprintln(this, "*** Engine Module: Bullet Jams Piston Head..");
                        }
                        getEnergyPastArmor(22.5F, shot);
                    }
                } else
                if(s.startsWith("xxeng1mag"))
                {
                    int j = s.charAt(9) - 49;
                    ((FlightModelMain) (super.FM)).EI.engines[0].setMagnetoKnockOut(shot.initiator, j);
                    Aircraft.debugprintln(this, "*** Engine Module: Magneto " + j + " Destroyed..");
                } else
                if(s.endsWith("sync"))
                {
                    if(getEnergyPastArmor(2.1F, shot) > 0.0F && World.Rnd().nextFloat() < 0.5F)
                    {
                        Aircraft.debugprintln(this, "*** Engine Module: Gun Synchronized Hit, Nose Guns Lose Authority..");
                        ((FlightModelMain) (super.FM)).AS.setJamBullets(0, 0);
                        ((FlightModelMain) (super.FM)).AS.setJamBullets(0, 1);
                    }
                } else
                if(s.endsWith("oil1"))
                {
                    ((FlightModelMain) (super.FM)).AS.hitOil(shot.initiator, 0);
                    reflectGlassState(2);
                    Aircraft.debugprintln(this, "*** Engine Module: Oil Radiator Hit..");
                }
            }
            if(s.startsWith("xxoil"))
            {
                ((FlightModelMain) (super.FM)).AS.hitOil(shot.initiator, 0);
                getEnergyPastArmor(0.22F, shot);
                reflectGlassState(2);
                Aircraft.debugprintln(this, "*** Engine Module: Oil Tank Pierced..");
            }
            if(s.startsWith("xxtank"))
            {
                int k = s.charAt(6) - 48;
                switch(k)
                {
                default:
                    break;

                case 1: // '\001'
                case 2: // '\002'
                    if(getEnergyPastArmor(0.1F, shot) > 0.0F && World.Rnd().nextFloat() < 0.25F)
                    {
                        if(((FlightModelMain) (super.FM)).AS.astateTankStates[2] == 0)
                        {
                            Aircraft.debugprintln(this, "*** Fuel Tank: Pierced..");
                            ((FlightModelMain) (super.FM)).AS.hitTank(shot.initiator, 2, 1);
                            ((FlightModelMain) (super.FM)).AS.doSetTankState(shot.initiator, 2, 1);
                        }
                        if(shot.powerType == 3 && World.Rnd().nextFloat() < 0.5F)
                        {
                            ((FlightModelMain) (super.FM)).AS.hitTank(shot.initiator, 2, 2);
                            Aircraft.debugprintln(this, "*** Fuel Tank: Hit..");
                        }
                    }
                    break;

                case 3: // '\003'
                    if(World.Rnd().nextFloat() < 0.05F)
                    {
                        Aircraft.debugprintln(this, "*** MW50 Tank: Pierced..");
                        ((FlightModelMain) (super.FM)).AS.setInternalDamage(shot.initiator, 2);
                    }
                    break;

                case 4: // '\004'
                    if(getEnergyPastArmor(1.7F, shot) > 0.0F && (shot.powerType == 3 && World.Rnd().nextFloat() < 0.5F || World.Rnd().nextFloat() < 0.25F))
                    {
                        Aircraft.debugprintln(this, "*** Nitrogen Oxyde Tank: Pierced, Nitros Flamed..");
                        ((FlightModelMain) (super.FM)).AS.hitTank(shot.initiator, 0, 100);
                        ((FlightModelMain) (super.FM)).AS.hitTank(shot.initiator, 1, 100);
                        ((FlightModelMain) (super.FM)).AS.hitTank(shot.initiator, 2, 100);
                    }
                    break;
                }
            }
            if(s.startsWith("xxmgun"))
            {
                if(s.endsWith("01"))
                {
                    Aircraft.debugprintln(this, "*** Cowling Gun: Disabled..");
                    ((FlightModelMain) (super.FM)).AS.setJamBullets(0, 0);
                }
                if(s.endsWith("02"))
                {
                    Aircraft.debugprintln(this, "*** Cowling Gun: Disabled..");
                    ((FlightModelMain) (super.FM)).AS.setJamBullets(0, 1);
                }
                if(s.endsWith("l"))
                {
                    Aircraft.debugprintln(this, "*** Wing Gun (L): Disabled..");
                    ((FlightModelMain) (super.FM)).AS.setJamBullets(1, 0);
                }
                if(s.endsWith("r"))
                {
                    Aircraft.debugprintln(this, "*** Wing Gun (L): Disabled..");
                    ((FlightModelMain) (super.FM)).AS.setJamBullets(1, 1);
                }
                getEnergyPastArmor(World.Rnd().nextFloat(3.3F, 12.96F), shot);
            }
            if(s.startsWith("xxcannon"))
            {
                Aircraft.debugprintln(this, "*** Nose Cannon: Disabled..");
                ((FlightModelMain) (super.FM)).AS.setJamBullets(1, 0);
                getEnergyPastArmor(World.Rnd().nextFloat(3.3F, 24.6F), shot);
            }
            if(s.startsWith("xxammo"))
            {
                if(World.Rnd().nextFloat(3800F, 30000F) < shot.power)
                {
                    if(s.endsWith("01"))
                    {
                        Aircraft.debugprintln(this, "*** Cowling Gun: Ammo Feed Chain Broken..");
                        ((FlightModelMain) (super.FM)).AS.setJamBullets(0, 0);
                    }
                    if(s.endsWith("02"))
                    {
                        Aircraft.debugprintln(this, "*** Cowling Gun: Ammo Feed Chain Broken..");
                        ((FlightModelMain) (super.FM)).AS.setJamBullets(0, 1);
                    }
                    if(s.endsWith("l"))
                    {
                        Aircraft.debugprintln(this, "*** Wing Gun (L): Ammo Feed Drum Damaged..");
                        ((FlightModelMain) (super.FM)).AS.setJamBullets(1, 0);
                    }
                    if(s.endsWith("r"))
                    {
                        Aircraft.debugprintln(this, "*** Wing Gun (R): Ammo Feed Drum Damaged..");
                        ((FlightModelMain) (super.FM)).AS.setJamBullets(1, 1);
                    }
                }
                getEnergyPastArmor(World.Rnd().nextFloat(0.0F, 28.33F), shot);
            }
            return;
        }
        if(s.startsWith("xcf") || s.startsWith("xcockpit"))
        {
            if(chunkDamageVisible("CF") < 3)
                hitChunk("CF", shot);
            if(s.startsWith("xcockpit"))
            {
                if(((Tuple3d) (point3d)).z > 0.40000000000000002D)
                {
                    ((FlightModelMain) (super.FM)).AS.setCockpitState(shot.initiator, ((FlightModelMain) (super.FM)).AS.astateCockpitState | 1);
                    reflectGlassState(5);
                    if(World.Rnd().nextFloat() < 0.1F)
                    {
                        ((FlightModelMain) (super.FM)).AS.setCockpitState(shot.initiator, ((FlightModelMain) (super.FM)).AS.astateCockpitState | 0x20);
                        reflectGlassState(5);
                    }
                } else
                if(((Tuple3d) (point3d)).y > 0.0D)
                {
                    ((FlightModelMain) (super.FM)).AS.setCockpitState(shot.initiator, ((FlightModelMain) (super.FM)).AS.astateCockpitState | 4);
                } else
                {
                    ((FlightModelMain) (super.FM)).AS.setCockpitState(shot.initiator, ((FlightModelMain) (super.FM)).AS.astateCockpitState | 0x10);
                    reflectGlassState(5);
                }
                if(((Tuple3d) (point3d)).x > 0.20000000000000001D)
                    ((FlightModelMain) (super.FM)).AS.setCockpitState(shot.initiator, ((FlightModelMain) (super.FM)).AS.astateCockpitState | 0x40);
            }
        } else
        if(s.startsWith("xeng"))
        {
            if(chunkDamageVisible("Engine1") < 2)
                hitChunk("Engine1", shot);
        } else
        if(s.startsWith("xtail"))
        {
            if(chunkDamageVisible("Tail1") < 3)
                hitChunk("Tail1", shot);
        } else
        if(s.startsWith("xkeel"))
        {
            if(chunkDamageVisible("Keel1") < 2)
                hitChunk("Keel1", shot);
        } else
        if(s.startsWith("xrudder"))
        {
            if(chunkDamageVisible("Rudder1") < 1)
                hitChunk("Rudder1", shot);
        } else
        if(s.startsWith("xstab"))
        {
            if(s.startsWith("xstabl") && chunkDamageVisible("StabL") < 2)
                hitChunk("StabL", shot);
            if(s.startsWith("xstabr") && chunkDamageVisible("StabR") < 1)
                hitChunk("StabR", shot);
        } else
        if(s.startsWith("xvator"))
        {
            if(s.startsWith("xvatorl") && chunkDamageVisible("VatorL") < 1)
                hitChunk("VatorL", shot);
            if(s.startsWith("xvatorr") && chunkDamageVisible("VatorR") < 1)
                hitChunk("VatorR", shot);
        } else
        if(s.startsWith("xwing"))
        {
            if(s.startsWith("xwinglin") && chunkDamageVisible("WingLIn") < 3)
                hitChunk("WingLIn", shot);
            if(s.startsWith("xwingrin") && chunkDamageVisible("WingRIn") < 3)
                hitChunk("WingRIn", shot);
            if(s.startsWith("xwinglmid") && chunkDamageVisible("WingLMid") < 3)
                hitChunk("WingLMid", shot);
            if(s.startsWith("xwingrmid") && chunkDamageVisible("WingRMid") < 3)
                hitChunk("WingRMid", shot);
            if(s.startsWith("xwinglout") && chunkDamageVisible("WingLOut") < 3)
                hitChunk("WingLOut", shot);
            if(s.startsWith("xwingrout") && chunkDamageVisible("WingROut") < 3)
                hitChunk("WingROut", shot);
        } else
        if(s.startsWith("xarone"))
        {
            if(s.startsWith("xaronel"))
                hitChunk("AroneL", shot);
            if(s.startsWith("xaroner"))
                hitChunk("AroneR", shot);
        } else
        if(s.startsWith("xpilot") || s.startsWith("xhead"))
        {
            byte byte0 = 0;
            int l;
            if(s.endsWith("a"))
            {
                byte0 = 1;
                l = s.charAt(6) - 49;
            } else
            if(s.endsWith("b"))
            {
                byte0 = 2;
                l = s.charAt(6) - 49;
            } else
            {
                l = s.charAt(5) - 49;
            }
            hitFlesh(l, shot, byte0);
            if(((FlightModelMain) (super.FM)).AS.getPilotHealth(0) < 1.0F)
                reflectGlassState(8);
        }
    }

    private void cutOp(int i)
    {
        super.FM.Operate &= ~(1L << i);
    }

    protected boolean getOp(int i)
    {
        return (((FlightModelMain) (super.FM)).Operate & 1L << i) != 0L;
    }

    private float Op(int i)
Logged
Great minds discuss ideas. Average minds discuss events. Small minds discuss people. - Hyman Rickover (but probably predating his use.)
Pages: [1] 2   Go Up
 

Page created in 0.044 seconds with 24 queries.