Rear-fire + look views (task #68): the pod's rear arsenal reconstructed
The user's tip ("some mechs actually do fire backward") checks out end to
end. Binary ground truth [T1]:
- weapon+0x334 (attr 0x1B "RearFiring"): the ctor tests the MOUNT SEGMENT's
page name for the marker 'b' (@0x511aa2, part_013.c:6913-6930) -- the back
gun ports sitelbgunport/siterbgunport. The old reading ("EXT in the
weapon model name") was a double misread (wrong string, wrong name).
- mech+0x410 (attr id 50 "RearFiring"; the old `stateFlags` label): the ctor
ORs every weapon's flag (part_012.c:10220) -- "carries a rear arsenal".
- The mapper's five-state LOOK machine (part_013.c:396-459): on a state
change it re-aims the eyepoint (mech+0x360 = EyepointRotation -- consumed
by DPLEyeRenderable, already live in the port) and re-arms each weapon's
viewFireEnable(+0x3E0): FORWARD view = the non-rear weapons, LOOK-BACK
(yaw pi + lookBackAngle pitch) = the REAR-mounted ones, side/down = none.
+0x3E0 is the same flag the emitter's Loaded->Firing gate reads (the old
`useConfiguredPip` label) -- pips and fire permission both follow the view.
Port: rearFiring derived from the mount segment name (BTWeaponMountIsRear);
mech rearFiring ORed in the roster pass (the old SubProxy::IsDerivedFrom
stub returned 0 -- that loop never ran; now bridged through
BTWeaponIsRearFiring, which also fixes the weaponRoster fill); the look
commit is LIVE (BTCommitLookState: eyepoint EulerAngles from the authored
per-mech look angles -- now real members, were Wword scratch parks -- +
per-weapon view enables); MissileLauncher/ProjectileWeapon FireWeapon gate
on viewFireEnable like the emitter; RearFiring attrs (mech + weapon) bind
real members. Keyboard: HOLD 'V' = the pod's rear-view button.
Live-verified on the default blackhawk: ERMLaser_2 -> siterbgunport rear=1,
ERMLaser_3 -> sitelbgunport rear=1, PPCs/SRMs/torso mounts forward -- the
blackhawk authors TWO REAR LASERS (owens also has back ports). [rearfire]
trace under BT_PROJ_LOG.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
ab6ea83e3b
commit
38febae36b
@@ -697,6 +697,12 @@ void
|
||||
}
|
||||
throttlePosition = (key_throttle >= 0.0f) ? key_throttle : -key_throttle;
|
||||
reverseThrust = (key_throttle < 0.0f) ? 1 : 0;
|
||||
// (task #68) look-behind: hold 'V' = the pod's rear-view button.
|
||||
// (The other look buttons stay unbound on the keyboard rig.)
|
||||
{
|
||||
extern int gBTLookBehind;
|
||||
lookBehind = gBTLookBehind;
|
||||
}
|
||||
// CONTROL-MODE AXIS ROUTING (2026-07-13, the pod mapping): in
|
||||
// BASIC the stick steers the legs (turn) and the torso auto-
|
||||
// centers; in STANDARD/VETERAN the stick is the TORSO (free aim /
|
||||
@@ -893,14 +899,16 @@ void
|
||||
|
||||
if (lookState != previousLookState)
|
||||
{
|
||||
// TODO(look-eyepoint): the commit block below writes the eyepoint pose at
|
||||
// binary offsets whose Mech-member mapping is CONFLICTED (mech+0x360 is
|
||||
// claimed by mechName, +0x410 by stateFlags, +0x7bc by weaponRoster --
|
||||
// and the old draft even routed them through the TORSO pointer). Arbitrate
|
||||
// those labels against the raw before enabling; the port has no eyepoint
|
||||
// consumer yet. Look-state SELECTION above stays live (this-only).
|
||||
DEBUG_STREAM << "[mppr] look state -> " << lookState
|
||||
<< " (eyepoint commit deferred)\n" << std::flush;
|
||||
// (task #68) the look commit is LIVE: the conflicted labels are
|
||||
// arbitrated (mech+0x360 = EyepointRotation -- the eye renderable
|
||||
// consumes it; +0x410 = RearFiring; the +0x7bc children = the WEAPON
|
||||
// roster, not cameras). BTCommitLookState (mech4.cpp complete-type
|
||||
// TU) re-aims the eyepoint and re-arms each weapon's viewFireEnable:
|
||||
// forward view = the non-rear weapons, LOOK-BACK = the rear-mounted
|
||||
// ones, side/down = none.
|
||||
extern void BTCommitLookState(void *mech, int look_state);
|
||||
BTCommitLookState((void *)mech, (int)lookState);
|
||||
DEBUG_STREAM << "[mppr] look state -> " << lookState << "\n" << std::flush;
|
||||
}
|
||||
else if (0) // DEFERRED body (kept for the reconstruction record)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user