The brake step runs in every air state, as it does for every air mission - #47
Merged
Merged
Conversation
The original has one per-tick air mover. Mover::Update (0x43DD20) hands any unit whose definition says canfly to 0x43D290, whatever mission it is on, and the brake step sits inside that. So the bomber's run, the gunship's ring and the fighter's dogfight all strip speed above BrakeRate and put it back along the nose, the same as a unit on its way somewhere. In RWE the gunship ring and the dogfight already flew through the flying state's velocity function and so had the step from the first port. The attack run steers its own heading and did not; it now runs the step on the velocity it starts from, before the swing, in the original's order. A Thunder's BrakeRate of 0.4 against its MaxVelocity of 9 means a bomber flies where it points. Two attack-run fixtures had left the nose on its default heading while the aircraft flew flat out along another; they point the nose along the flight path now, as updateUnitRotation keeps it in the game, and their decoded geometry is unchanged. Issue: #41 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PJCbwC9MGZnM6erMDKptun
HectorBailey
changed the base branch from
23-brakerate-nose-reaim
to
revival
September 11, 2026 20:28
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #41. Stacked on #36 (the base branch of this PR is
23-brakerate-nose-reaim); once #36 merges this retargets torevivalwith one commit.The decode.
0x43D290has exactly one caller:Mover::Updateat0x43DD46, which readsdef+0x241bit 11 (canfly) and picks the air follower for any such unit, whatever mission it is on. §87's table already had this. So the attack missions do not have movers of their own; the brake step at0x43D38Eruns for the bomber's run, the gunship's ring and the fighter's dogfight alike, after drag and before the turn.What changed.
computeNewAttackRunVelocityappliesapplyBrakeRateNoseReaimto the velocity it starts from, before its heading swing. The gunship ring and the dogfight already delegate tocomputeNewAirUnitVelocityand so had the step since An aircraft's speed above BrakeRate goes where its nose points #36; nothing to change there.docs/TOTALA-EXE.md§1 updated.UnitBehaviorService_air.test.cppleft the nose on its default heading (+z) while the aircraft flew flat out along +x. With the step, a nose left there veers the aircraft on the first tick and the half-circle reversal is over in four. They now point the nose along the flight path before the loop, which is whatupdateUnitRotationdoes in the game (the sibling section was already doing it inside its loop). The decoded geometry those tests pin, the turn radius and the never-slowing speed, is unchanged.Verified, with real FBI values from rev31.gp3 (ARMTHUND 9/0.4/0.08/356, ARMBRAWL 6.6/4/0.16/800, ARMFIG 10/6/0.35/512):
brakerate.test.cpp: one test case with a section per state, each starting a unit flying flat out along +x with its nose on +z and a goal far along +x. With the rule, the crosswise speed drops to BrakeRate within a tick's acceleration (the bomber's to 0.4, so it turns almost entirely along the nose); with BrakeRate out of reach it stays.rwe_test: all 556 test cases pass (71511 assertions), Linux gcc-14 Debug, including the bomber, gunship and fighter geometry tests.🤖 Generated with Claude Code
https://claude.ai/code/session_01PJCbwC9MGZnM6erMDKptun