# MECHWEAP.CPP / .HPP — reconstruction notes `MechWeapon` (: PoweredSubsystem) is the weapon base: PPC/GaussRifle bind it via Emitter, the SRMs via ProjectileWeapon/MissileLauncher. The resource streams rechargeRate / weaponRange / damage / heatCostToFire (+ pip fields). ## Reconstructed - Statics (ClassDerivations, DefaultData on Subsystem::MessageHandlers/ AttributeIndex), ctor streaming the tuning fields, damageData prime. - **View-fire gating (2026-07-21, the look-commit wave):** real `rearFiring` / `viewFireEnable` members (1995 binary @0x334/@0x3E0) + `IsRearFiring()` / `GetViewFireEnable()` / `SetViewFireEnable()`. The ctor resolves REAR-FIRING authentically (binary ctor tail @004b99a8): the mount SEGMENT site name (`owner->GetSegment(GetSegmentIndex())`) is tested for the 'b' (back) marker — only the back gun ports (`sitelbgunport`/`siterbgunport`) carry it. Spawn state = armed for the forward view. `Mech::CommitLookState` re-arms on every view change (see MECH.NOTES.md increment 7). Verified: the TEST.EGG mech's two rear lasers (ERMLaser_2/3) arm only in LOOK-BACK. ## Still staged - `FireWeapon` (abstract here; the concrete fire paths in Emitter/PPC/Gauss/ MissileLauncher are the combat wave), `SendDamage` (damage/networking), `CreateStreamedSubsystem` (tool-side model build). - The 1995 MechWeapon attribute table (RearFiring @0x1B, EstimatedReadyTime, ...) is not yet published — our DefaultData still uses the base Subsystem::AttributeIndex. Comes with the weapon-gauge/console wave. - ~~`MechWeapon::MessageHandlers` declared but not defined~~ — **FIXED 2026-07-21**: it is now a real defined set (`(0, NULL, Subsystem::MessageHandlers)` — no own handlers yet, inherits the chain), and `MechWeapon::DefaultData` binds it. This mattered because the surviving CODE PPC.CPP binds the inherited name (`PPC::MessageHandlers`) into PPC::DefaultData, and a declared-but-undefined static links as a zero-filled common block — the same silent-NULL trap as the Emitter::AttributeIndex crash. Real weapon handlers (fire/damage messages) come with the combat wave (grow the table in place).