Skip to content

Staging: a drop tank with a built-in sepratron still holds the stage - #2787

Merged
lamont-granquist merged 1 commit into
MuMech:devfrom
abahnj:fix/sepratron-drop-tanks
Nov 21, 2026
Merged

lamont-granquist merged 1 commit into
MuMech:devfrom
abahnj:fix/sepratron-drop-tanks

Conversation

@abahnj

@abahnj abahnj commented Nov 21, 2026

Copy link
Copy Markdown
Contributor

Since #2350 ("Drop engines even though crossfeeding"), autostage drops boosters whose tank part carries a built-in separation motor right after the launch clamps are released, instead of at booster burnout.

Example: RO/RN R-7 blocks B/V/G/D (rn_r7_blok_bvgd*). Each block is a tank with an anchored decoupler and a small throttle-locked solid motor that activates even if disconnected, so IsSepratron() is true for the tank part. The RD-107 and its verniers are separate parts attached to the tank.

Cause: in HasActiveOrIdleEngineOrTankDescendant the !p.IsSepratron() guard wrapped both checks: "is this part a running engine" and "is this part a tank feeding a running engine". Since #2350 a running engine with drop tanks no longer holds the stage itself (EnginesHaveDropTanks), it defers to its tanks. With the tank skipped as a sepratron, nothing holds the stage. Before #2350 the RD-107 parts held it themselves, so this didn't show. The FuelFlowSimulation side of #2350 is unaffected (WouldDropAccessibleFuelTank doesn't look at sepratron status), which is why the Δv window showed the boosters burning ~117 s while autostage dropped them at once.

Fix: only the engine check skips sepratrons; the tank check runs for every part. A real sepratron's own fuel is never matched by the tank check because its engine isn't in the active engine list, so this only changes parts that are both a tank and a sepratron. The #2350 behaviour is kept: a crossfeeding booster is still dropped once its own tanks are empty.

Tested in KSP 1.12.5 / RP-1 with a Sputnik 1 R-7 (RN parts, booster sep motors kept), Classic ascent, autostage on, hot staging on:

HasActiveOrIdleEngineOrTankDescendant skipped sepratron parts entirely,
including the check for a tank feeding a running engine. Since running
engines with drop tanks defer to those tanks (EnginesHaveDropTanks), a
booster tank that carries its own separation motor (RO/RN R-7 blocks
B/V/G/D: a throttle-locked solid that activates even if disconnected)
left nothing holding the stage, and autostage dropped the boosters right
after the launch clamps released.

Only the engine test now skips sepratrons; the tank test runs for every
part. A real sepratron's own fuel is never matched, since its engine is
not in the active engine list, so this only changes parts that are both
a tank and a sepratron. Crossfeeding boosters are still dropped once
their own tanks are empty.
@lamont-granquist
lamont-granquist merged commit dee2bc0 into MuMech:dev Nov 21, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants