[
EDIT, Apr 14, 2025] To cut to the chase on the fix (detailed in my reply #13)... In Aircraft.cut() and Aircraft.cut_Subtrees(), as written in the resolved B.A.T. 4 class I had downloaded, the reference values for astateEffectChunks[] were out of sync with the values defined in AircraftState.class! And so the effects for fuel tanks, engines, oil, nav lights and landing lights would NOT be attached to the correct wreckage chunks when cut from the plane.
[
end of edit]
For several years I've been plagued 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.
