RWE has no pitch for units; the renderer applies yaw and roll only.
What the original does: pitches aircraft from the longitudinal term (PitchScale, def+0x1A6 into unit+0x68), and tilts ground units to the terrain unless the FBI says upright. upright and digger are decoded and were left because there was no pitch to attach them to.
Needs: a pitch angle on the unit, set from PitchScale for aircraft and from the slope under a ground unit without upright, and applied in the unit's render transform.
Where to look: src/rwe/sim/UnitState.h, the flight model and ground physics in src/rwe/sim/UnitBehaviorService.cpp, and the unit draw transform in the renderer.
Watch for: new unit state goes in all four places in CLAUDE.md's determinism section (the struct, save_util.cpp, GameHash_util.cpp, dump_util.cpp).
Done when: aircraft nose up and down through climbs and dives, a tank tilts on a slope, an upright unit does not, with tests for the sim side.
One item, one PR. Opened from the unchecked Phase 1 list in docs/ROADMAP.md; the findings it cites are in docs/TOTALA-EXE.md.
RWE has no pitch for units; the renderer applies yaw and roll only.
What the original does: pitches aircraft from the longitudinal term (
PitchScale,def+0x1A6intounit+0x68), and tilts ground units to the terrain unless the FBI saysupright.uprightanddiggerare decoded and were left because there was no pitch to attach them to.Needs: a pitch angle on the unit, set from PitchScale for aircraft and from the slope under a ground unit without
upright, and applied in the unit's render transform.Where to look:
src/rwe/sim/UnitState.h, the flight model and ground physics insrc/rwe/sim/UnitBehaviorService.cpp, and the unit draw transform in the renderer.Watch for: new unit state goes in all four places in CLAUDE.md's determinism section (the struct,
save_util.cpp,GameHash_util.cpp,dump_util.cpp).Done when: aircraft nose up and down through climbs and dives, a tank tilts on a slope, an
uprightunit does not, with tests for the sim side.One item, one PR. Opened from the unchecked Phase 1 list in
docs/ROADMAP.md; the findings it cites are indocs/TOTALA-EXE.md.