Loading [MathJax]/extensions/Safe.js

Special Aircraft Service

Please login or register.

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

Author Topic: Effects remaining attached to 'invisible' hooks  (Read 319 times)

0 Members and 1 Guest are viewing this topic.

WxTech

  • Modder
  • member
  • Offline Offline
  • Posts: 6162
Effects remaining attached to 'invisible' hooks
« on: March 21, 2025, 10:52:31 AM »

For several years I've been plaqued by a problem. Actually, I can no longer recall if this hasn't always been present to at least some degree. And that is damaged engine fire and smoke effects remaining attached to hooks which don't leave with the engine when the engine has been cut away from the plane. It's especially horrible for wing-mounted engines when the whole wing is gone, for then the effects emanate from a spot in empty space beside the plane.

This can happen when the plane breaks up in the air or when cracking up on the ground but not completely exploding.

A clue to the issue might be furnished from this aspect, evidenced well by twins such as Bf-110s and Do-17s. A plane which has crash landed, with wings and empennage broken off, with no crew inside, being basically just the crewless CF_Dx.msh, can remain on the ground in this state for MANY, MANY minutes (normally an empty plane will 'time out' after a minute--or is it two?). It seems some conditional state has not been completed to indicate the plane is 'dead', probably related to the CF mesh specifically, it being effectively treated as still crewed and viable. If I strafe the hell out of it I can hasten its proper destruction; otherwise it just hangs about seemingly forever, with fire/smoke belching forth.

Additionally, even when stopped on the ground the fire and smoke effects are ALWAYS the SPD versions which are intended to be active during flight. The correct GND versions are never switched to. In other words, the plane is treated as though it's still in flight as far as this aspect is concerned.

In AircraftState.class we have such methods as changeEngineEffectBase(), with equivalents for oil and tank. In Aircraft.class methods cut() and cut_Subtrees() all these changeEffectBase methods. I don't know what this means, supposing it's related to keeping hooks tied to chunks with those chunks when cut away. Of course I could be very wrong.  ;)

I haven't determined if the state of the crew has a role to play. For instance, I know that when the crew are dead or bailed while the plane is in the air and the engine falls off, this problem occurs. I don't know for sure if when any crew are alive and the engine falls off whether or not the hooks to which the effects are tied leave with the engine(s).

Where would be the more likely places to focus attention to try to ferret out what's going on? I've done lots of alterations to AircraftState.class and Aircraft.class, and I have little doubt I've done something bad.  :(
Logged
Great minds discuss ideas. Average minds discuss events. Small minds discuss people. - Hyman Rickover (but probably predating his use.)

WxTech

  • Modder
  • member
  • Offline Offline
  • Posts: 6162
Re: Effects remaining attached to 'invisible' hooks
« Reply #1 on: March 24, 2025, 08:01:58 AM »

In this capture you can see that the Do-17's wings and engines have been shot away. But smoke effects are still active for both 'ghost' engines, and one has a fire ongoing.




Here's my current focus. Below is the relevant part of AircraftState.doSetTankState(), as appears in the EngineMod I scoured a couple or few years back. Might be v2.7.

This is the nucleus of what I've built upon, incorporating fuel leak fireball effects (and numerous other effect string substitutions for a variety of conditions.)

My major concern with this code is the casting of the fuel leak fireball effects to astateEngineEffects[0]. I should think astateTankEffects would be appropriate, for these two crucial reasons:

- Engine count and fuel tank count often will not match, with tanks limited to 4 but engines can well exceed 4.

- And The number of damage states for tanks is 7 whereas for engines it's 5.

In other words, we can have astateTankStates[0][0] through astateTankStates[3][6], whereas we can have astateEngineStates[0][0] through astateEngineStates[7][4]. As a result I've long ago changed assignment to astateTankEffects. Among my numerous changes during these past couple of days, reverting to astateEngineEffects was tried, but that didn't help.

Another curiosity springs from the check of the presence of any wing chunk, as from:

if(s1.toLowerCase().startsWith("wing"))
{
    flag4 = true;
    if(aircraft.hierMesh().isChunkVisible(s1) && j == 5)
        flag2 = true;
}

I note that my problem involves missing wing chunks which held the engines whose effects are stubbornly remaining active,


Code: [Select]
public boolean doSetTankState(Actor actor1, int i, int j)
{
boolean flag = aircraft.isChunkAnyDamageVisible(astateEffectChunks[i + 0]);
Aircraft.debugprintln(aircraft, "Stating Tank " + i + " to state " + j + (flag ? ".." : " rejected (missing part).."));
if(!flag)
return false;
if(World.getPlayerAircraft() == actor)
{
if(astateTankStates[i] == 0 && (j == 1 || j == 2))
HUD.log("FailedTank");
if(astateTankStates[i] < 5 && j >= 5)
HUD.log("FailedTankOnFire");
}
boolean flag1 = false;
if(astateTankStates[i] != j && j >= 4 && rnd.nextInt(0, 1) == 0)
flag1 = true;
byte byte0 = astateTankStates[i];
astateTankStates[i] = (byte)j;
boolean flag2 = false;
boolean flag3 = false;
if(j == 5 && byte0 < 4)
flag2 = true;
if(j == 4 && byte0 == 4)
flag3 = true;
if(j == 4 && byte0 < 3)
{
flag3 = true;
flag2 = true;
}
if(astateTankStates[i] < 5 && j >= 5)
{
aircraft.FM.setTakenMortalDamage(true, actor1);
aircraft.FM.setCapableOfACM(false);
}
if(j < 4 && aircraft.FM.isCapableOfBMP())
aircraft.FM.setTakenMortalDamage(false, actor1);
byte byte1 = 0;
if(!bIsAboveCriticalSpeed)
byte1 = 21;
for(int k = 0; k < 3; k++)
{
if(astateTankEffects[i][k] != null)
Eff3DActor.finish(astateTankEffects[i][k]);
astateTankEffects[i][k] = null;
String s = astateTankStrings[byte1 + k + j * 3];
if(flag3 && s == null)
s = "3DO/Effects/Aircraft/FireSPDShort.eff";
if(s == null)
continue;
if(j > 2)
{
boolean flag4 = false;
Hook hook1 = actor.findHook("_Tank" + (i + 1) + "Burn");
String s1 = hook1.chunkName();
if(s1.toLowerCase().startsWith("wing"))
{
flag4 = true;
if(aircraft.hierMesh().isChunkVisible(s1) && j == 5)
flag2 = true;
}
if(s.equals("3DO/Effects/Aircraft/FireSPD.eff"))
{
if(flag4)
s = "3DO/Effects/Aircraft/FireSPDWing.eff";
} else
if(s.equals("3DO/Effects/Aircraft/FireSPDLong.eff"))
{
if(flag4)
s = "3DO/Effects/Aircraft/FireSPDWingLong.eff";
} else
if(s.equals("3DO/Effects/Aircraft/BlackHeavySPD.eff"))
{
if(flag2)
s = null;
else
if(flag4)
s = "3DO/Effects/Aircraft/BlackHeavySPDWing.eff";
} else
if(s.equals("3DO/Effects/Aircraft/BlackHeavyTSPD.eff") && flag2 && !flag3)
s = null;
if(s != null)
{
if(flag1)
{
astateEngineEffects[i][0] = Eff3DActor.New(actor, hook1, null, 1.0F, "3DO/Effects/Fireworks/Tank_Burn_s.eff", -1F);
astateEngineEffects[i][0] = Eff3DActor.New(actor, hook1, null, 1.0F, "3DO/Effects/Fireworks/Tank_SmokeBoiling_s.eff", -1F);
astateEngineEffects[i][0] = Eff3DActor.New(actor, hook1, null, 1.0F, "3DO/Effects/Fireworks/Tank_Sparks_s.eff", -1F);
astateEngineEffects[i][0] = Eff3DActor.New(actor, hook1, null, 1.0F, "3DO/Effects/Fireworks/Tank_SparksP_s.eff", -1F);
}
astateTankEffects[i][k] = Eff3DActor.New(actor, hook1, null, 1.0F, s, -1F);
}
} else
{
if(flag1)
{
astateEngineEffects[i][0] = Eff3DActor.New(actor, actor.findHook("_Tank" + (i + 1) + "Leak"), null, 1.0F, "3DO/Effects/Fireworks/Tank_Burn_s.eff", -1F);
astateEngineEffects[i][0] = Eff3DActor.New(actor, actor.findHook("_Tank" + (i + 1) + "Leak"), null, 1.0F, "3DO/Effects/Fireworks/Tank_SmokeBoiling_s.eff", -1F);
astateEngineEffects[i][0] = Eff3DActor.New(actor, actor.findHook("_Tank" + (i + 1) + "Leak"), null, 1.0F, "3DO/Effects/Fireworks/Tank_Sparks_s.eff", -1F);
astateEngineEffects[i][0] = Eff3DActor.New(actor, actor.findHook("_Tank" + (i + 1) + "Leak"), null, 1.0F, "3DO/Effects/Fireworks/Tank_SparksP_s.eff", -1F);
}
astateTankEffects[i][k] = Eff3DActor.New(actor, actor.findHook("_Tank" + (i + 1) + "Leak"), null, 1.0F, s, -1F);
}
if(j > 4)
{
Hook hook = actor.findHook("_Tank" + (i + 1) + "Burn");
Point3d point3d = aircraft.getTankBurnLightPoint(i, hook);
boolean flag5 = true;
for(int l = 0; l < astateTankBurnLights.length; l++)
{
if(astateTankBurnLights[l] == null)
continue;
Point3d point3d1 = astateTankBurnLights[l].relPos;
double d = point3d.distance(point3d1);
if(d >= 1.0D)
continue;
flag5 = false;
break;
}

if(flag5)
{
for(int i1 = 0; i1 < astateEngineBurnLights.length; i1++)
{
if(astateEngineBurnLights[i1] == null)
continue;
Point3d point3d2 = astateEngineBurnLights[i1].relPos;
double d1 = point3d.distance(point3d2);
if(d1 >= 1.0D)
continue;
flag5 = false;
break;
}

}
if(flag5)
{
astateTankBurnLights[i] = new LightPointActor(new LightPoint(), point3d);
astateTankBurnLights[i].light.setColor(1.0F, 0.9F, 0.5F);
astateTankBurnLights[i].light.setEmit(5F, 5F);
actor.draw.lightMap().put("_TankBurnLight" + i, astateTankBurnLights[i]);
}
continue;
}
if(astateTankBurnLights[i] != null)
{
actor.draw.lightMap().remove("_TankBurnLight" + i);
astateTankBurnLights[i].destroy();
astateTankBurnLights[i] = null;
}
}
.
.
.
.
}

private static final String astateTankStrings[] = {
null, null, null,
"3DO/Effects/Aircraft/RedLeakTSPD.eff", null, null,
"3DO/Effects/Aircraft/RedLeakTSPD.eff", null, null,
"3DO/Effects/Aircraft/TankBlackMediumSPD.eff", "3DO/Effects/Aircraft/TankBlackMediumTSPD.eff", null,
"3DO/Effects/Aircraft/BlackHeavySPD.eff", "3DO/Effects/Aircraft/BlackHeavyTSPD.eff", null,
"3DO/Effects/Aircraft/FireSPD.eff", "3DO/Effects/Aircraft/BlackHeavySPD.eff", "3DO/Effects/Aircraft/BlackHeavyTSPD.eff",
"3DO/Effects/Aircraft/FireSPDLong.eff", "3DO/Effects/Aircraft/BlackHeavySPD.eff", "3DO/Effects/Aircraft/BlackHeavyTSPD.eff",
null, null, null,
"3DO/Effects/Aircraft/RedLeakGND.eff", null, null,
"3DO/Effects/Aircraft/RedLeakGND.eff", null, null,
"3DO/Effects/Aircraft/BlackMediumGND.eff", null, null,
"3DO/Effects/Aircraft/BlackHeavyGND.eff", null, null,
"3DO/Effects/Aircraft/FireGND.eff", "3DO/Effects/Aircraft/BlackHeavyGND.eff", null,
"3DO/Effects/Aircraft/FireGND.eff", "3DO/Effects/Aircraft/BlackHeavyGND.eff", null
};

private static final String astateEngineStrings[] = {
null, null, null,
"3DO/Effects/Aircraft/GraySmallSPD.eff", "3DO/Effects/Aircraft/GraySmallTSPD.eff", null,
"3DO/Effects/Aircraft/EngineBlackMediumSPD.eff", "3DO/Effects/Aircraft/EngineBlackMediumTSPD.eff", null,
"3DO/Effects/Aircraft/BlackHeavySPD.eff", "3DO/Effects/Aircraft/EngineBlackHeavyTSPD.eff", null,
"3DO/Effects/Aircraft/FireSPD.eff", "3DO/Effects/Aircraft/BlackHeavySPD.eff", "3DO/Effects/Aircraft/EngineBlackHeavyTSPD.eff",
null, null, null,
"3DO/Effects/Aircraft/GraySmallGND.eff", null, null,
"3DO/Effects/Aircraft/BlackMediumGND.eff", null, null,
"3DO/Effects/Aircraft/BlackHeavyGND.eff", null, null,
"3DO/Effects/Aircraft/FireGND.eff", "3DO/Effects/Aircraft/BlackHeavyGND.eff", null
};
Logged
Great minds discuss ideas. Average minds discuss events. Small minds discuss people. - Hyman Rickover (but probably predating his use.)

WxTech

  • Modder
  • member
  • Offline Offline
  • Posts: 6162
Re: Effects remaining attached to 'invisible' hooks
« Reply #2 on: March 24, 2025, 09:54:33 AM »

If anyone who knows that their game uses the Engine Mod (v2.7 probably being best) could try blowing the wings off of a Do-17 or Bf-110, that could be helpful. Otherwise I might have to strip out my very involved code temporarily and build it back up from simple, first principles.  :(

When testing, using 2 or more 20mm cannon to quickly get the engines smoking/burning before plucking off the wings is recommended. After an engines has one or more effects being generated is when shearing off the wing can proceed. Statistically, more than half the time this condition will be met when a good volley of cannon shot pummels the poor crate; no need for sniping. Bombers present a good test because of their generally minor maneuvering.

If it's consistently enough shown that you don't suffer this problem, I'll know I've got more sleuthing to do.
Logged
Great minds discuss ideas. Average minds discuss events. Small minds discuss people. - Hyman Rickover (but probably predating his use.)

WxTech

  • Modder
  • member
  • Offline Offline
  • Posts: 6162
Re: Effects remaining attached to 'invisible' hooks
« Reply #3 on: March 25, 2025, 10:41:05 AM »

Here are the three methods in AircraftState.class which change the effect base for oil, tank and engine. I wonder why only for engines do we see this:

    astateEngineStates = 0;

which resets the damage state of the specified engine to undamaged. Why not a similar approach for oil and tanks?

Code: [Select]
public void changeOilEffectBase(int i, Actor actor1)  //STOCK
{
if(actor1 != null)
{
for(int j = 0; j < 2; j++)
if(astateOilEffects[i][j] != null)
astateOilEffects[i][j].pos.changeBase(actor1, null, true);

}
}


public void changeTankEffectBase(int i, Actor actor1)
{
if(actor1 != null)
{
for(int j = 0; j < 3; j++)
if(astateTankEffects[i][j] != null)
astateTankEffects[i][j].pos.changeBase(actor1, null, true);

}
if(astateTankBurnLights[i] != null)
{
actor.draw.lightMap().remove("_TankBurnLight" + i);
astateTankBurnLights[i].destroy();
astateTankBurnLights[i] = null;
}
aircraft.sfxSmokeState(2, i, false);
}


public void changeEngineEffectBase(int i, Actor actor1)
{
if(actor1 != null)
{
for(int j = 0; j < 3; j++)
if(astateEngineEffects[i][j] != null)
astateEngineEffects[i][j].pos.changeBase(actor1, null, true);

}
if(astateEngineBurnLights[i] != null)
{
actor.draw.lightMap().remove("_EngineBurnLight" + i);
astateEngineBurnLights[i].destroy();
astateEngineBurnLights[i] = null;
}
aircraft.sfxSmokeState(1, i, false);
astateEngineStates[i] = 0;
}
Logged
Great minds discuss ideas. Average minds discuss events. Small minds discuss people. - Hyman Rickover (but probably predating his use.)

WxTech

  • Modder
  • member
  • Offline Offline
  • Posts: 6162
Re: Effects remaining attached to 'invisible' hooks
« Reply #4 on: March 28, 2025, 04:52:47 AM »

I've been systematically rolling back various mods among the classes I've mangled. ;)

After going back to certain stock methods in Aircraft.class and AircraftState.class, and reverting to the stock Motor.class (to remove the full throttle mod elements), with test runs at every stage, I just tried another test run blasting some 110s. At the moment I was tearing one apart I had a crash to desktop, and here's the log output. The first three lines are my own output for the random damage mod (which I don't think plays a role because it's a very recent addition, whereas this issue has plagued me for well over a year.)

Code: [Select]
[2025-03-28 10:19:11.758] dT:  654 BiasPlayer=1.0 AxisMod=4.0 iRandom=60        kill COMPRESSOR eng#1 A/C=ZZ + DH
[2025-03-28 10:19:11.773] dT:    2 BiasPlayer=1.0 AxisMod=4.0 iRandom=24       CYLINDER knock-out eng#1 A/C=ZZ + BH
[2025-03-28 10:19:12.932] dT:  121 BiasPlayer=1.0 AxisMod=4.0 iRandom=28       CYLINDER knock-out eng#1 A/C=ZZ + KH
[2025-03-28 10:19:28.581] dT:  521 java.lang.NoSuchFieldError: bPropHit
[2025-03-28 10:19:28.581] dT:    0 at com.maddox.il2.objects.air.Aircraft.hitProp(Aircraft.java:2706)
[2025-03-28 10:19:28.581] dT:    0 at com.maddox.il2.objects.air.BF_110.cutFM(BF_110.java:786)
[2025-03-28 10:19:28.581] dT:    0 at com.maddox.il2.objects.air.Aircraft.nextCUTLevel(Aircraft.java:992)
[2025-03-28 10:19:28.581] dT:    0 at com.maddox.il2.objects.air.BF_110G2.nextCUTLevel(BF_110G2.java:31)
[2025-03-28 10:19:28.581] dT:    0 at com.maddox.il2.objects.air.Aircraft.nextDMGLevel(Aircraft.java:935)
[2025-03-28 10:19:28.581] dT:    0 at com.maddox.il2.objects.air.BF_110G2.nextDMGLevel(BF_110G2.java:24)
[2025-03-28 10:19:28.581] dT:    0 at com.maddox.il2.objects.air.Aircraft.nextDMGLevels(Aircraft.java:976)
[2025-03-28 10:19:28.581] dT:    0 at com.maddox.il2.objects.air.Aircraft.hitChunk(Aircraft.java:2315)
[2025-03-28 10:19:28.581] dT:    0 at com.maddox.il2.objects.air.BF_110.hitBone(BF_110.java:652)
[2025-03-28 10:19:28.581] dT:    0 at com.maddox.il2.objects.air.Aircraft.msgShot(Aircraft.java:2052)
[2025-03-28 10:19:28.581] dT:    0 at com.maddox.il2.objects.air.Aircraft.splintersHit(Aircraft.java:1729)
[2025-03-28 10:19:28.581] dT:    0 at com.maddox.il2.objects.air.Aircraft.msgExplosion(Aircraft.java:1747)
[2025-03-28 10:19:28.581] dT:    0 at com.maddox.il2.ai.MsgExplosion.invokeListener(MsgExplosion.java:62)
[2025-03-28 10:19:28.581] dT:    0 at com.maddox.rts.Message._send(Message.java:1217)
[2025-03-28 10:19:28.581] dT:    0 at com.maddox.rts.Message.sendToObject(Message.java:1158)
[2025-03-28 10:19:28.581] dT:    0 at com.maddox.rts.Message.sendTo(Message.java:1134)
[2025-03-28 10:19:28.581] dT:    0 at com.maddox.rts.Message.trySend(Message.java:1115)
[2025-03-28 10:19:28.581] dT:    0 at com.maddox.rts.Message.send(Message.java:1091)
[2025-03-28 10:19:28.581] dT:    0 at com.maddox.il2.ai.MsgExplosion.send(MsgExplosion.java:37)
[2025-03-28 10:19:28.581] dT:    0 at com.maddox.il2.ai.MsgExplosion.send(MsgExplosion.java:15)
[2025-03-28 10:19:28.581] dT:    0 at com.maddox.il2.objects.air.Aircraft$1.doAction(Aircraft.java:1883)
[2025-03-28 10:19:28.581] dT:    0 at com.maddox.rts.MsgAction.invokeListener(MsgAction.java:152)
[2025-03-28 10:19:28.581] dT:    0 at com.maddox.rts.Message._send(Message.java:1217)
[2025-03-28 10:19:28.582] dT:    0 at com.maddox.rts.Message.sendToObject(Message.java:1191)
[2025-03-28 10:19:28.582] dT:    0 at com.maddox.rts.Message.sendTo(Message.java:1134)
[2025-03-28 10:19:28.582] dT:    0 at com.maddox.rts.Message.trySend(Message.java:1115)
[2025-03-28 10:19:28.582] dT:    0 at com.maddox.rts.Time.loopMessages(Time.java:252)
[2025-03-28 10:19:28.582] dT:    0 at com.maddox.rts.RTSConf.loopMsgs(RTSConf.java:101)
[2025-03-28 10:19:28.582] dT:    0 at com.maddox.il2.game.MainWin3D.loopApp(MainWin3D.java:131)
[2025-03-28 10:19:28.582] dT:    0 at com.maddox.il2.game.Main.exec(Main.java:422)
[2025-03-28 10:19:28.582] dT:    0 at com.maddox.il2.game.GameWin3D.main(GameWin3D.java:235)


Here's BF_110.cutFM(), with line #786 apparently following the case 33 break:

Code: [Select]
    protected boolean cutFM(int i, int j, Actor actor)
    {
        switch(i)
        {
        default:
            break;

        case 33: // '!'
            hitProp(0, j, actor);
            break;

        case 36: // '$'
            hitProp(1, j, actor);
            break;

        case 12: // '\f'
        case 18: // '\022'
        case 19: // '\023'
            hierMesh().chunkVisible("Wire_D0", false);
            break;

        case 34: // '"'
            ((FlightModelMain) (super.FM)).AS.hitEngine(this, 0, 2);
            if(World.Rnd().nextFloat() < 0.66F)
                ((FlightModelMain) (super.FM)).AS.hitEngine(this, 0, 2);
            break;

        case 37: // '%'
            ((FlightModelMain) (super.FM)).AS.hitEngine(this, 1, 2);
            if(World.Rnd().nextFloat() < 0.66F)
                ((FlightModelMain) (super.FM)).AS.hitEngine(this, 1, 2);
            break;
        }
        return super.cutFM(i, j, actor);
    }


Here's Aircraft.nextCUTLevel, and line 992 is highlighted. It's revealing how this method sends a chat log entry, "gore_sawwing", which seems obviously related to wing removal, which lies at the heart of my problem.

Code: [Select]
    protected void nextCUTLevel(String s, int i, Actor actor)
    {
        FM.dryFriction = 1.0F;
        debugprintln("Detected NCL in " + s + "..");
        if(this == World.getPlayerAircraft() && !World.cur().diffCur.Vulnerability)
            return;
        int j = s.length() - 1;
        HierMesh hiermesh = hierMesh();
        String s1 = s;
        boolean flag = s.charAt(j - 2) == '_' && Character.toUpperCase(s.charAt(j - 1)) == 'D' && Character.isDigit(s.charAt(j));
        if(!flag && !hiermesh.isChunkVisible(s1))
            return;
        int k = part(s);
        if(cutFM(k, i, actor))  //<<< ----------  line #992  ------------------------
        {
            FM.cut(k, i, actor);  //FlightModelMain.class, for parts 0 - 43, sets various states as well
            netPutCut(k, i, actor);
            if(FM.isPlayers() && this != actor && (actor instanceof Aircraft) && ((Aircraft)actor).isNetPlayer() && i == 2 && !FM.isSentWingNote() && !FM.isSentBuryNote() && (k == 34 || k == 37 || k == 33 || k == 36))
            {
                Chat.sendLogRnd(3, "gore_sawwing", (Aircraft)actor, this);
                FM.setSentWingNote(true);
            }
        }
    }


And here's Aircraft.hitProp(), with line #2706 highlighted:

Code: [Select]
    public void hitProp(int i, int j, Actor actor)
    {
        if(i > FM.EI.getNum() - 1 || oldProp[i] == 2)
            return;
        super.hitProp(i, j, actor);
        FM.cut(part("Engine" + (i + 1)), j, actor);  //FlightModelMain.class
        if(isChunkAnyDamageVisible("Prop" + (i + 1)) || isChunkAnyDamageVisible("PropRot" + (i + 1)))
        {
            hierMesh().chunkVisible(Props[i][0], false);
            hierMesh().chunkVisible(Props[i][1], false);
            hierMesh().chunkVisible(Props[i][2], true);
        }
        FM.EI.engines[i].setFricCoeffT(2.0F);
        FM.EI.engines[i].bPropHit = true;  //<<< -----------  line #2706  ----------------
        oldProp[i] = 2;
    }


bPropHit is instantiated as false in Motor.class, and is checked in Motor.getFrictionMoment(), along with bIsInoperable OR stage == 0 OR controlMagneto == 0

Looks like I'm getting closer to the cause and solution? Any thoughts and hints?

Thanks!
Logged
Great minds discuss ideas. Average minds discuss events. Small minds discuss people. - Hyman Rickover (but probably predating his use.)

WxTech

  • Modder
  • member
  • Offline Offline
  • Posts: 6162
Re: Effects remaining attached to 'invisible' hooks
« Reply #5 on: March 28, 2025, 06:54:50 AM »

After spending many hours systematically rolling back a number of mod elements, the problem persists.

Perhaps it would be helpful to know if this was present with my v1.6 effects mod pack. Which would be probably quicker for someone using that mod to check out than for me to make all the changes necessary...  :-|
Logged
Great minds discuss ideas. Average minds discuss events. Small minds discuss people. - Hyman Rickover (but probably predating his use.)

WxTech

  • Modder
  • member
  • Offline Offline
  • Posts: 6162
Re: Effects remaining attached to 'invisible' hooks
« Reply #6 on: March 29, 2025, 09:43:36 AM »

I've put a printStackTrace call in Aircraft.cut(). I wanted to see what would be reported when I took off a plane's wing (ideally after damaging an engine.) In this test run that's what I did, and the engine smoke was still issuing forth from the 'ghost' engine floating alongside the plane. ;)

I also added a line in Aircraft.cutFM() to send to the log the part name that has been cut. Here StabR (18), Engine4 (6) and WingRMid (37) were cut. Note how we always have

  Aircraft.nextCUTLevel(Aircraft.java:988)

Here's the method, with line #988 identified. If this were my plane having its wing cut, I would expect to to have had the "gore_sawwing" Chat msg sent, as the part# k=37 was indeed cut. Is there a failure of
     if(cutFM(k, i, actor))
to be satisfied?


Code: [Select]
    protected void nextCUTLevel(String s, int i, Actor actor)
    {
        FM.dryFriction = 1.0F;
        debugprintln("Detected NCL in " + s + "..");
        if(this == World.getPlayerAircraft() && !World.cur().diffCur.Vulnerability)
            return;
        int j = s.length() - 1;
        HierMesh hiermesh = hierMesh();
        String s1 = s;
        boolean flag = s.charAt(j - 2) == '_' && Character.toUpperCase(s.charAt(j - 1)) == 'D' && Character.isDigit(s.charAt(j));
        if(!flag && !hiermesh.isChunkVisible(s1))
            return;
        int k = part(s);
        if(cutFM(k, i, actor))  //<-------- line #988
        {
            FM.cut(k, i, actor);  //FlightModelMain.class, for parts 0 - 43, sets various states as well
            netPutCut(k, i, actor);
            if(FM.isPlayers() && this != actor && (actor instanceof Aircraft) && ((Aircraft)actor).isNetPlayer() && i == 2 && !FM.isSentWingNote() && !FM.isSentBuryNote() && (k == 34 || k == 37 || k == 33 || k == 36))
            {
                Chat.sendLogRnd(3, "gore_sawwing", (Aircraft)actor, this);
                FM.setSentWingNote(true);
            }
        }
    }


Here's the part of FlightModelMain.cut() concerned with part #37, and those related for which the switch function falls through:
Code: [Select]
        case 36: // '$'
            Sq.liftWingRIn *= 0.25F;
            ((ActorHMesh)this.actor).destroyChildFiltered(com.maddox.il2.objects.weapons.BombGun.class);
            ((ActorHMesh)this.actor).destroyChildFiltered(com.maddox.il2.objects.weapons.RocketBombGun.class);
            cut(10, j, actor);
            cutOp(37);
            // fall through

        case 37: // '%'
            setTakenMortalDamage(true, actor);
            setReadyToDie(true);
            Sq.liftWingRMid *= 0.0F;
            Sq.liftWingRIn *= 0.9F;
            ((ActorHMesh)this.actor).destroyChildFiltered(com.maddox.il2.objects.weapons.RocketGun.class);
            cutOp(38);
            // fall through

        case 38: // '&'
            setCapableOfBMP(false, actor);
            setCapableOfACM(false);
            AS.bWingTipRExists = false;
            AS.setStallState(false);
            AS.setAirShowState(false);
            Sq.liftWingROut *= 0.0F;
            Sq.liftWingRMid *= 0.5F;
            Sq.liftWingROut = 0.0F;
            Sq.liftWingRMid = 0.0F;
            Sq.liftWingRIn = 0.0F;
            CT.bHasAileronControl = false;
            cutOp(1);
            // fall through

        case 1: // '\001'
            if(Op(0) == 0.0F)
                setCapableOfACM(false);
            Sq.squareAilerons *= 0.5F;
            SensRoll *= 0.5F * Op(0);
            break;


log.lst output.
Code: [Select]
[2025-03-29 15:16:42.755] dT:    0 Mission: QuickQMBPro/PAC_New_Georgia/PAC_New_Georgiabluenone00.mis is Playing
[2025-03-29 15:16:42.755] dT:    0 INTERNAL ERROR: Can't open file 'PaintSchemes/Pilots/Default'
[2025-03-29 15:16:43.611] dT:   29 warning: no files : music/inflight
[2025-03-29 15:17:03.708] dT: 2089 java.lang.Exception: Aircraft.cut() method call!
[2025-03-29 15:17:03.708] dT:    0 at com.maddox.il2.objects.air.Aircraft.cut(Aircraft.java:220)
[2025-03-29 15:17:03.708] dT:    0 at com.maddox.il2.objects.air.B_24.cutFM(B_24.java:758)
[2025-03-29 15:17:03.708] dT:    0 at com.maddox.il2.objects.air.B_24J100.cutFM(B_24J100.java:90)
[2025-03-29 15:17:03.708] dT:    0 at com.maddox.il2.objects.air.Aircraft.nextCUTLevel(Aircraft.java:988)
[2025-03-29 15:17:03.708] dT:    0 at com.maddox.il2.objects.air.Aircraft.nextDMGLevel(Aircraft.java:931)
[2025-03-29 15:17:03.708] dT:    0 at com.maddox.il2.objects.air.Aircraft.nextDMGLevels(Aircraft.java:972)
[2025-03-29 15:17:03.708] dT:    0 at com.maddox.il2.objects.air.Aircraft.msgExplosion(Aircraft.java:1884)
[2025-03-29 15:17:03.708] dT:    0 at com.maddox.il2.objects.air.B_24.msgExplosion(B_24.java:607)
[2025-03-29 15:17:03.708] dT:    0 at com.maddox.il2.ai.MsgExplosion.invokeListener(MsgExplosion.java:62)
[2025-03-29 15:17:03.708] dT:    0 at com.maddox.rts.Message._send(Message.java:1217)
[2025-03-29 15:17:03.708] dT:    0 at com.maddox.rts.Message.sendToObject(Message.java:1158)
[2025-03-29 15:17:03.709] dT:    0 at com.maddox.rts.Message.sendTo(Message.java:1134)
[2025-03-29 15:17:03.709] dT:    0 at com.maddox.rts.Message.trySend(Message.java:1115)
[2025-03-29 15:17:03.709] dT:    0 at com.maddox.rts.Message.send(Message.java:1091)
[2025-03-29 15:17:03.709] dT:    0 at com.maddox.il2.ai.MsgExplosion.send(MsgExplosion.java:37)
[2025-03-29 15:17:03.709] dT:    0 at com.maddox.il2.ai.MsgExplosion.send(MsgExplosion.java:15)
[2025-03-29 15:17:03.709] dT:    0 at com.maddox.il2.objects.weapons.Bullet.collided(Bullet.java:206)
[2025-03-29 15:17:03.709] dT:    0 at com.maddox.il2.engine.MsgBulletCollision.invokeListener(MsgBulletCollision.java:39)
[2025-03-29 15:17:03.709] dT:    0 at com.maddox.rts.Message._send(Message.java:1217)
[2025-03-29 15:17:03.709] dT:    0 at com.maddox.rts.Message.sendToObject(Message.java:1191)
[2025-03-29 15:17:03.709] dT:    0 at com.maddox.rts.Message.sendTo(Message.java:1134)
[2025-03-29 15:17:03.709] dT:    0 at com.maddox.rts.Message.trySend(Message.java:1115)
[2025-03-29 15:17:03.709] dT:    0 at com.maddox.rts.Time.loopMessages(Time.java:252)
[2025-03-29 15:17:03.709] dT:    0 at com.maddox.rts.RTSConf.loopMsgs(RTSConf.java:101)
[2025-03-29 15:17:03.709] dT:    0 at com.maddox.il2.game.MainWin3D.loopApp(MainWin3D.java:131)
[2025-03-29 15:17:03.709] dT:    0 at com.maddox.il2.game.Main.exec(Main.java:422)
[2025-03-29 15:17:03.709] dT:    0 at com.maddox.il2.game.GameWin3D.main(GameWin3D.java:235)
[2025-03-29 15:17:03.710] dT:    0 cutFM() partNames[18]: StabR
[2025-03-29 15:17:03.710] dT:    0 java.lang.Exception: Aircraft.cut() method call!
[2025-03-29 15:17:03.710] dT:    0 at com.maddox.il2.objects.air.Aircraft.cut(Aircraft.java:220)
[2025-03-29 15:17:03.710] dT:    0 at com.maddox.il2.objects.air.Aircraft.cutFM(Aircraft.java:853)
[2025-03-29 15:17:03.710] dT:    0 at com.maddox.il2.objects.air.B_24.cutFM(B_24.java:762)
[2025-03-29 15:17:03.710] dT:    0 at com.maddox.il2.objects.air.B_24J100.cutFM(B_24J100.java:90)
[2025-03-29 15:17:03.710] dT:    0 at com.maddox.il2.objects.air.Aircraft.nextCUTLevel(Aircraft.java:988)
[2025-03-29 15:17:03.710] dT:    0 at com.maddox.il2.objects.air.Aircraft.nextDMGLevel(Aircraft.java:931)
[2025-03-29 15:17:03.710] dT:    0 at com.maddox.il2.objects.air.Aircraft.nextDMGLevels(Aircraft.java:972)
[2025-03-29 15:17:03.710] dT:    0 at com.maddox.il2.objects.air.Aircraft.msgExplosion(Aircraft.java:1884)
[2025-03-29 15:17:03.710] dT:    0 at com.maddox.il2.objects.air.B_24.msgExplosion(B_24.java:607)
[2025-03-29 15:17:03.710] dT:    0 at com.maddox.il2.ai.MsgExplosion.invokeListener(MsgExplosion.java:62)
[2025-03-29 15:17:03.710] dT:    0 at com.maddox.rts.Message._send(Message.java:1217)
[2025-03-29 15:17:03.710] dT:    0 at com.maddox.rts.Message.sendToObject(Message.java:1158)
[2025-03-29 15:17:03.710] dT:    0 at com.maddox.rts.Message.sendTo(Message.java:1134)
[2025-03-29 15:17:03.710] dT:    0 at com.maddox.rts.Message.trySend(Message.java:1115)
[2025-03-29 15:17:03.710] dT:    0 at com.maddox.rts.Message.send(Message.java:1091)
[2025-03-29 15:17:03.710] dT:    0 at com.maddox.il2.ai.MsgExplosion.send(MsgExplosion.java:37)
[2025-03-29 15:17:03.710] dT:    0 at com.maddox.il2.ai.MsgExplosion.send(MsgExplosion.java:15)
[2025-03-29 15:17:03.710] dT:    0 at com.maddox.il2.objects.weapons.Bullet.collided(Bullet.java:206)
[2025-03-29 15:17:03.710] dT:    0 at com.maddox.il2.engine.MsgBulletCollision.invokeListener(MsgBulletCollision.java:39)
[2025-03-29 15:17:03.710] dT:    0 at com.maddox.rts.Message._send(Message.java:1217)
[2025-03-29 15:17:03.710] dT:    0 at com.maddox.rts.Message.sendToObject(Message.java:1191)
[2025-03-29 15:17:03.710] dT:    0 at com.maddox.rts.Message.sendTo(Message.java:1134)
[2025-03-29 15:17:03.710] dT:    0 at com.maddox.rts.Message.trySend(Message.java:1115)
[2025-03-29 15:17:03.710] dT:    0 at com.maddox.rts.Time.loopMessages(Time.java:252)
[2025-03-29 15:17:03.710] dT:    0 at com.maddox.rts.RTSConf.loopMsgs(RTSConf.java:101)
[2025-03-29 15:17:03.710] dT:    0 at com.maddox.il2.game.MainWin3D.loopApp(MainWin3D.java:131)
[2025-03-29 15:17:03.710] dT:    0 at com.maddox.il2.game.Main.exec(Main.java:422)
[2025-03-29 15:17:03.710] dT:    0 at com.maddox.il2.game.GameWin3D.main(GameWin3D.java:235)
[2025-03-29 15:17:06.188] dT:   83 cutFM() partNames[6]: Engine4
[2025-03-29 15:17:06.188] dT:    0 java.lang.Exception: Aircraft.cut() method call!
[2025-03-29 15:17:06.188] dT:    0 at com.maddox.il2.objects.air.Aircraft.cut(Aircraft.java:220)
[2025-03-29 15:17:06.188] dT:    0 at com.maddox.il2.objects.air.Aircraft.cutFM(Aircraft.java:853)
[2025-03-29 15:17:06.188] dT:    0 at com.maddox.il2.objects.air.B_24.cutFM(B_24.java:762)
[2025-03-29 15:17:06.188] dT:    0 at com.maddox.il2.objects.air.B_24J100.cutFM(B_24J100.java:90)
[2025-03-29 15:17:06.188] dT:    0 at com.maddox.il2.objects.air.Aircraft.nextCUTLevel(Aircraft.java:988)
[2025-03-29 15:17:06.188] dT:    0 at com.maddox.il2.objects.air.Aircraft.nextDMGLevel(Aircraft.java:931)
[2025-03-29 15:17:06.188] dT:    0 at com.maddox.il2.objects.air.Aircraft.nextDMGLevels(Aircraft.java:972)
[2025-03-29 15:17:06.188] dT:    0 at com.maddox.il2.objects.air.Aircraft.msgExplosion(Aircraft.java:1884)
[2025-03-29 15:17:06.188] dT:    0 at com.maddox.il2.objects.air.B_24.msgExplosion(B_24.java:607)
[2025-03-29 15:17:06.188] dT:    0 at com.maddox.il2.ai.MsgExplosion.invokeListener(MsgExplosion.java:62)
[2025-03-29 15:17:06.188] dT:    0 at com.maddox.rts.Message._send(Message.java:1217)
[2025-03-29 15:17:06.188] dT:    0 at com.maddox.rts.Message.sendToObject(Message.java:1158)
[2025-03-29 15:17:06.188] dT:    0 at com.maddox.rts.Message.sendTo(Message.java:1134)
[2025-03-29 15:17:06.188] dT:    0 at com.maddox.rts.Message.trySend(Message.java:1115)
[2025-03-29 15:17:06.188] dT:    0 at com.maddox.rts.Message.send(Message.java:1091)
[2025-03-29 15:17:06.188] dT:    0 at com.maddox.il2.ai.MsgExplosion.send(MsgExplosion.java:37)
[2025-03-29 15:17:06.188] dT:    0 at com.maddox.il2.ai.MsgExplosion.send(MsgExplosion.java:15)
[2025-03-29 15:17:06.188] dT:    0 at com.maddox.il2.objects.weapons.Bullet.collided(Bullet.java:206)
[2025-03-29 15:17:06.188] dT:    0 at com.maddox.il2.engine.MsgBulletCollision.invokeListener(MsgBulletCollision.java:39)
[2025-03-29 15:17:06.188] dT:    0 at com.maddox.rts.Message._send(Message.java:1217)
[2025-03-29 15:17:06.188] dT:    0 at com.maddox.rts.Message.sendToObject(Message.java:1191)
[2025-03-29 15:17:06.188] dT:    0 at com.maddox.rts.Message.sendTo(Message.java:1134)
[2025-03-29 15:17:06.188] dT:    0 at com.maddox.rts.Message.trySend(Message.java:1115)
[2025-03-29 15:17:06.188] dT:    0 at com.maddox.rts.Time.loopMessages(Time.java:252)
[2025-03-29 15:17:06.188] dT:    0 at com.maddox.rts.RTSConf.loopMsgs(RTSConf.java:101)
[2025-03-29 15:17:06.188] dT:    0 at com.maddox.il2.game.MainWin3D.loopApp(MainWin3D.java:131)
[2025-03-29 15:17:06.188] dT:    0 at com.maddox.il2.game.Main.exec(Main.java:422)
[2025-03-29 15:17:06.188] dT:    0 at com.maddox.il2.game.GameWin3D.main(GameWin3D.java:235)
[2025-03-29 15:17:06.917] dT:   25 cutFM() partNames[37]: WingRMid
[2025-03-29 15:17:06.917] dT:    0 java.lang.Exception: Aircraft.cut() method call!
[2025-03-29 15:17:06.917] dT:    0 at com.maddox.il2.objects.air.Aircraft.cut(Aircraft.java:220)
[2025-03-29 15:17:06.917] dT:    0 at com.maddox.il2.objects.air.Aircraft.cutFM(Aircraft.java:853)
[2025-03-29 15:17:06.917] dT:    0 at com.maddox.il2.objects.air.B_24.cutFM(B_24.java:762)
[2025-03-29 15:17:06.917] dT:    0 at com.maddox.il2.objects.air.B_24J100.cutFM(B_24J100.java:90)
[2025-03-29 15:17:06.917] dT:    0 at com.maddox.il2.objects.air.Aircraft.nextCUTLevel(Aircraft.java:988)
[2025-03-29 15:17:06.917] dT:    0 at com.maddox.il2.objects.air.Aircraft.nextDMGLevel(Aircraft.java:931)
[2025-03-29 15:17:06.917] dT:    0 at com.maddox.il2.objects.air.B_24.rareAction(B_24.java:787)
[2025-03-29 15:17:06.917] dT:    0 at com.maddox.il2.fm.AIFlightModel.update(AIFlightModel.java:49)
[2025-03-29 15:17:06.918] dT:    0 at com.maddox.il2.ai.air.Maneuver.update(Maneuver.java:832)
[2025-03-29 15:17:06.918] dT:    0 at com.maddox.il2.ai.air.Pilot.update(Pilot.java:180)
[2025-03-29 15:17:06.918] dT:    0 at com.maddox.il2.fm.FlightModelMain.tick(FlightModelMain.java:1193)
[2025-03-29 15:17:06.918] dT:    0 at com.maddox.il2.engine.Interpolators.tick(Interpolators.java:222)
[2025-03-29 15:17:06.918] dT:    0 at com.maddox.il2.engine.Actor.interpolateTick(Actor.java:371)
[2025-03-29 15:17:06.918] dT:    0 at com.maddox.il2.engine.InterpolateAdapter.msgTimeOut(InterpolateAdapter.java:174)
[2025-03-29 15:17:06.918] dT:    0 at com.maddox.rts.MsgTimeOut.invokeListener(MsgTimeOut.java:73)
[2025-03-29 15:17:06.918] dT:    0 at com.maddox.rts.Message._send(Message.java:1217)
[2025-03-29 15:17:06.918] dT:    0 at com.maddox.rts.Message.sendToObject(Message.java:1191)
[2025-03-29 15:17:06.918] dT:    0 at com.maddox.rts.Message.sendTo(Message.java:1134)
[2025-03-29 15:17:06.918] dT:    0 at com.maddox.rts.Message.trySend(Message.java:1115)
[2025-03-29 15:17:06.918] dT:    0 at com.maddox.rts.Time.loopMessages(Time.java:252)
[2025-03-29 15:17:06.918] dT:    0 at com.maddox.rts.RTSConf.loopMsgs(RTSConf.java:101)
[2025-03-29 15:17:06.918] dT:    0 at com.maddox.il2.game.MainWin3D.loopApp(MainWin3D.java:131)
[2025-03-29 15:17:06.918] dT:    0 at com.maddox.il2.game.Main.exec(Main.java:422)
[2025-03-29 15:17:06.918] dT:    0 at com.maddox.il2.game.GameWin3D.main(GameWin3D.java:235)
Logged
Great minds discuss ideas. Average minds discuss events. Small minds discuss people. - Hyman Rickover (but probably predating his use.)

WxTech

  • Modder
  • member
  • Offline Offline
  • Posts: 6162
Re: Effects remaining attached to 'invisible' hooks
« Reply #7 on: March 29, 2025, 10:14:18 AM »

More head-scratching. I've added output to Aircraft.nextCUTLevel(), to see if my previous concerns was valid, namelt a potential failure to execute

    FM.cut(k, i, actor)

I have output before and after, and they are consistent, as shown in the snippet of log.lst output supplied below.

Code: [Select]
    protected void nextCUTLevel(String s, int i, Actor actor)
    {
        FM.dryFriction = 1.0F;
        debugprintln("Detected NCL in " + s + "..");
        if(this == World.getPlayerAircraft() && !World.cur().diffCur.Vulnerability)
            return;
        int j = s.length() - 1;
        HierMesh hiermesh = hierMesh();
        String s1 = s;
        boolean flag = s.charAt(j - 2) == '_' && Character.toUpperCase(s.charAt(j - 1)) == 'D' && Character.isDigit(s.charAt(j));
        if(!flag && !hiermesh.isChunkVisible(s1))
            return;
        int k = part(s);
System.out.println("nextCutLevel pre: cutFM(" + k + ", " + i + ", " + actor + ")");
        if(cutFM(k, i, actor))
        {
            FM.cut(k, i, actor);  //FlightModelMain.class, for parts 0 - 43, sets various states as well
System.out.println("nextCutLevel pst: cutFM(" + k + ", " + i + ", " + actor + ")");
            netPutCut(k, i, actor);
            if(FM.isPlayers() && this != actor && (actor instanceof Aircraft) && ((Aircraft)actor).isNetPlayer() && i == 2 && !FM.isSentWingNote() && !FM.isSentBuryNote() && (k == 34 || k == 37 || k == 33 || k == 36))
            {
                Chat.sendLogRnd(3, "gore_sawwing", (Aircraft)actor, this);
                FM.setSentWingNote(true);
            }
        }
    }


Here in log.lst we see the output seeming to show correctly WingRIn (part #36) being cut. I imagine that the "actor" here is me because I'm the instigator of the event. Later when the B-24 crashed actorland was the instigator, and after that the actor was the B-24 for subsequent cutting away of parts.

Code: [Select]
[2025-03-29 16:00:29.330] dT:   25 nextCutLevel pre: cutFM(36, 0, com.maddox.il2.objects.air.KI_84_IC@e27)
[2025-03-29 16:00:29.330] dT:    0 cutFM() partNames[36]: WingRIn
[2025-03-29 16:00:29.330] dT:    0 java.lang.Exception: Aircraft.cut() method call!
[2025-03-29 16:00:29.330] dT:    0 at com.maddox.il2.objects.air.Aircraft.cut(Aircraft.java:220)
[2025-03-29 16:00:29.330] dT:    0 at com.maddox.il2.objects.air.Aircraft.cutFM(Aircraft.java:853)
[2025-03-29 16:00:29.331] dT:    0 at com.maddox.il2.objects.air.B_24.cutFM(B_24.java:762)
[2025-03-29 16:00:29.331] dT:    0 at com.maddox.il2.objects.air.B_24J100.cutFM(B_24J100.java:90)
[2025-03-29 16:00:29.331] dT:    0 at com.maddox.il2.objects.air.Aircraft.nextCUTLevel(Aircraft.java:989)
[2025-03-29 16:00:29.331] dT:    0 at com.maddox.il2.objects.air.Aircraft.nextDMGLevel(Aircraft.java:931)
[2025-03-29 16:00:29.331] dT:    0 at com.maddox.il2.objects.air.Aircraft.nextDMGLevels(Aircraft.java:972)
[2025-03-29 16:00:29.331] dT:    0 at com.maddox.il2.objects.air.Aircraft.msgCollision(Aircraft.java:1740)
[2025-03-29 16:00:29.331] dT:    0 at com.maddox.il2.engine.MsgCollision.invokeListener(MsgCollision.java:72)
[2025-03-29 16:00:29.331] dT:    0 at com.maddox.rts.Message._send(Message.java:1217)
[2025-03-29 16:00:29.331] dT:    0 at com.maddox.rts.Message.sendToObject(Message.java:1158)
[2025-03-29 16:00:29.331] dT:    0 at com.maddox.rts.Message.sendTo(Message.java:1134)
[2025-03-29 16:00:29.331] dT:    0 at com.maddox.rts.Message.trySend(Message.java:1115)
[2025-03-29 16:00:29.331] dT:    0 at com.maddox.rts.Time.loopMessages(Time.java:252)
[2025-03-29 16:00:29.331] dT:    0 at com.maddox.rts.RTSConf.loopMsgs(RTSConf.java:101)
[2025-03-29 16:00:29.331] dT:    0 at com.maddox.il2.game.MainWin3D.loopApp(MainWin3D.java:131)
[2025-03-29 16:00:29.331] dT:    0 at com.maddox.il2.game.Main.exec(Main.java:422)
[2025-03-29 16:00:29.331] dT:    0 at com.maddox.il2.game.GameWin3D.main(GameWin3D.java:235)
[2025-03-29 16:00:29.332] dT:    0 nextCutLevel pst: cutFM(36, 0, com.maddox.il2.objects.air.KI_84_IC@e27)


I guess I'll have to probe elsewhere to see where the fault lies. Anyone have a good suggestion on where to insert a stack trace call?
Logged
Great minds discuss ideas. Average minds discuss events. Small minds discuss people. - Hyman Rickover (but probably predating his use.)

WxTech

  • Modder
  • member
  • Offline Offline
  • Posts: 6162
Re: Effects remaining attached to 'invisible' hooks
« Reply #8 on: Today at 09:22:21 AM »

I might be honing in on the problem... maybe.

I've added output to the three AircraftState methods which change the effect base for oil, tank and engine, like this:

Code: [Select]
    public void changeEngineEffectBase(int i, Actor actor1)
    {
        if(actor1 != null)
        {
            for(int j = 0; j < 3; j++)
{
                if(astateEngineEffects[i][j] != null)
{
                    astateEngineEffects[i][j].pos.changeBase(actor1, null, true);
System.out.println("AS EngEffBase i=" + i + " j=" + j);  //<<<---------------------------------- output to log
}
}

        }
        if(astateEngineBurnLights[i] != null)
        {
            actor.draw.lightMap().remove("_EngineBurnLight" + i);
            astateEngineBurnLights[i].destroy();
            astateEngineBurnLights[i] = null;
        }
        aircraft.sfxSmokeState(1, i, false);
        astateEngineStates[i] = 0;  //original; why change to 'no damage'?
    }

After taking apart numerous 4-engined bombers by gunfire, I'm getting ONLY events reported for tanks and oil, but NEVER for engine, even though engines are even being separated from wings. Given that my problem is tied to effects whose mesh chunk hooks seem to be part of engines, this might be the clue to the issue?

An example of the output:
Code: [Select]
[2025-03-31 15:06:04.362] dT: 1084 BiasPlayer=1.0 AxisMod=1.0 iRandom=88       MAGNETO #1 kill eng#1 A/C=12*
[2025-03-31 15:06:24.087] dT:  784 AS TankEffBase i=0 j=0
[2025-03-31 15:06:24.087] dT:    0 AS TankEffBase i=0 j=2
[2025-03-31 15:06:24.151] dT:    2 AS TankEffBase i=1 j=0
[2025-03-31 15:06:24.151] dT:    0 AS TankEffBase i=1 j=1
[2025-03-31 15:06:24.151] dT:    0 AS TankEffBase i=1 j=2
[2025-03-31 15:06:29.482] dT:  177 AS TankEffBase i=3 j=0
[2025-03-31 15:06:29.482] dT:    0 AS TankEffBase i=3 j=1
[2025-03-31 15:06:29.482] dT:    0 AS TankEffBase i=3 j=2
[2025-03-31 15:06:29.482] dT:    0 AS TankEffBase i=2 j=0
[2025-03-31 15:06:29.482] dT:    0 AS TankEffBase i=2 j=1
[2025-03-31 15:06:29.482] dT:    0 AS TankEffBase i=2 j=2
[2025-03-31 15:07:16.937] dT: 1160 BiasPlayer=1.0 AxisMod=1.0 iRandom=69        kill COMPRESSOR eng#2 A/C=03*
[2025-03-31 15:07:26.395] dT:  222 BiasPlayer=1.0 AxisMod=1.0 iRandom=35       CRANK CASE damage (setReadyness 0.9361013) eng#3 A/C=01*
[2025-03-31 15:07:35.456] dT:  302 AS TankEffBase i=3 j=0
[2025-03-31 15:07:35.456] dT:    0 AS TankEffBase i=3 j=2
[2025-03-31 15:07:35.456] dT:    0 AS TankEffBase i=2 j=0
[2025-03-31 15:07:35.456] dT:    0 AS TankEffBase i=2 j=1
[2025-03-31 15:07:35.456] dT:    0 AS TankEffBase i=2 j=2
[2025-03-31 15:08:09.854] dT:  831 BiasPlayer=1.0 AxisMod=1.0 iRandom=77       MAGNETO #0 kill eng#1 A/C=10*
[2025-03-31 15:08:37.794] dT:  931 AS OilEffBase i=0 k=0
[2025-03-31 15:08:37.794] dT:    0 AS OilEffBase i=0 k=1
[2025-03-31 15:09:07.890] dT:  828 BiasPlayer=1.0 AxisMod=1.0 iRandom=81       MAGNETO #1 kill eng#3 A/C=11*
[2025-03-31 15:09:28.426] dT:  684 AS TankEffBase i=3 j=0
[2025-03-31 15:09:28.426] dT:    0 AS TankEffBase i=3 j=1
[2025-03-31 15:09:28.426] dT:    0 AS TankEffBase i=3 j=2
[2025-03-31 15:09:28.476] dT:    2 AS TankEffBase i=0 j=0
[2025-03-31 15:09:28.476] dT:    0 AS TankEffBase i=0 j=1
[2025-03-31 15:09:28.476] dT:    0 AS TankEffBase i=0 j=2
[2025-03-31 15:09:28.548] dT:    2 AS TankEffBase i=2 j=0
[2025-03-31 15:09:28.548] dT:    0 AS TankEffBase i=2 j=1
[2025-03-31 15:09:28.548] dT:    0 AS TankEffBase i=2 j=2
[2025-03-31 15:10:01.565] dT: 1101 AS TankEffBase i=0 j=0
[2025-03-31 15:10:01.565] dT:    0 AS TankEffBase i=0 j=1
[2025-03-31 15:10:01.566] dT:    0 AS TankEffBase i=0 j=2
[2025-03-31 15:11:50.870] dT:  185 AS TankEffBase i=1 j=0
[2025-03-31 15:11:50.870] dT:    0 AS TankEffBase i=1 j=1
[2025-03-31 15:11:50.870] dT:    0 AS TankEffBase i=1 j=2
[2025-03-31 15:11:50.874] dT:    0 AS OilEffBase i=0 k=0
[2025-03-31 15:11:50.874] dT:    0 AS OilEffBase i=0 k=1
[2025-03-31 15:11:50.876] dT:    0 AS TankEffBase i=3 j=0
[2025-03-31 15:11:50.876] dT:    0 AS TankEffBase i=3 j=1
[2025-03-31 15:11:50.876] dT:    0 AS TankEffBase i=3 j=2
[2025-03-31 15:11:50.877] dT:    0 AS TankEffBase i=2 j=0
[2025-03-31 15:11:50.877] dT:    0 AS TankEffBase i=2 j=1
[2025-03-31 15:11:50.877] dT:    0 AS TankEffBase i=2 j=2
[2025-03-31 15:12:02.452] dT:  282 BiasPlayer=1.0 AxisMod=1.0 iRandom=69        kill COMPRESSOR eng#3 A/C=01*
[2025-03-31 15:12:41.462] dT: 1154 AS TankEffBase i=3 j=0
[2025-03-31 15:12:41.462] dT:    0 AS TankEffBase i=3 j=1
[2025-03-31 15:12:41.462] dT:    0 AS TankEffBase i=3 j=2
[2025-03-31 15:12:41.540] dT:    0 AS OilEffBase i=0 k=0
[2025-03-31 15:12:41.540] dT:    0 AS OilEffBase i=0 k=1
[2025-03-31 15:12:41.541] dT:    0 AS TankEffBase i=0 j=0
[2025-03-31 15:12:41.541] dT:    0 AS TankEffBase i=0 j=2
[2025-03-31 15:13:56.992] dT: 2518 AS OilEffBase i=0 k=0
[2025-03-31 15:13:56.992] dT:    0 AS OilEffBase i=0 k=1
Logged
Great minds discuss ideas. Average minds discuss events. Small minds discuss people. - Hyman Rickover (but probably predating his use.)
Pages: [1]   Go Up
 

Page created in 0.053 seconds with 23 queries.