Skip to content

Unit pitch: aircraft PitchScale, and upright / digger on slopes #24

Description

@CubeB

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    fidelityMatching what TotalA.exe doesrendererOpenGL rendering pipeline

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions