Gyro: damage fan-out FUN_004b2980 -- the cockpit hit-BOUNCE is live (task #56)

Re-disassembled the unexported gap 0x4b2980-0x4b2d8b byte-exact (capstone over
section_dump.txt) and reconstructed Gyroscope::ApplyDamageResponse:
- zero-damage + Collision(type 0) no-op; hit direction = Damage::damageForce
  or a RANDOM horizontal fallback when ~zero (per-component sign roll then
  value roll -- binary-legal until senders fill damageForce)
- direction rotated by the yaw-only torso-twist frame (placeRot=(0,twist,0)
  -> euler->matrix, the FUN_00408744 raw row-dot reproduced verbatim)
- per-type scaling amount / damageMultiplier[type] * damageResponse[type]
  .{trans,pitchRoll,yaw,vibration}; Explosive alone multiplies burstCount;
  each clamped at 1.3f
- four kicks: impulse(trans, dir), torque(pitchRoll, dir), impulse(vibration,
  vibrationDirection@0x390) and verticalImpulse(yaw, dir)

Layout corrections (byte-verified): gyro+0x390 is ONE Vector3D vibration axis
init (0,1,0) -- was mis-split as scalars animationOffset/Scale/Phase; mech
+0x5c4 is a FLOAT rumble-period countdown (gyroRumbleTimer) -- was mis-typed
int clipLoadGuard.

Call sites wired (binary-gated):
- take-damage hub: mech.cpp TakeDamageMessageHandler, FIRST action (@0x4a0264
  in hub FUN_004a0230) -- an invalid-zone hit still bounces
- crushable-icon crunch: mech4.cpp, torque 0.4 along the bounce delta-v + up
  impulse 0.2 (@4aa81e/@4aa86c)
- firing recoil: projweap.cpp FireWeapon, damage>3 -> impulse (0,0.6,-1.5)
  x damage/16 (@4bc136-4bc19c) via the new Mech::GetGyroSubsystem accessor

DEFERRED (recorded in KB with the byte recipe): the alternate-gait engage
jolt + 0.4s rumble (@4aa158-4aa365) -- its gates are [T3]-flagged and it
mutates the #49/#50-stabilized gait machine.

Verified live: [gyro-dmg] fires per hit with correct type scaling; eyePosition
shows the damped bounce (ramp to ~0.015u, oscillating Y, decay to zero); kill
chain un-regressed; no NaN.

Also recorded in KB: the OFFSET-COCKPIT verification -- Thor's authored
jointeye tranx=+1.13 matches its canopy X-center exactly AND our in-game eye
reproduces it to the hundredth (the placement model is correct per-mech); and
the playable roster is 8 models (strider/raptor/firstrtr/blkjack have assets
but no model resource -- BT_FORCE_MODEL with those names = NULL-resource AV,
cdb-verified, not a code bug).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
arcattack
2026-07-11 07:36:25 -05:00
co-authored by Claude Fable 5
parent cb85517ede
commit 946323b696
10 changed files with 283 additions and 25 deletions
+2 -2
View File
@@ -221,7 +221,7 @@ template<class...A> inline void *FUN_00406db4(A&&...) { return 0; } // ResourceF
// @0x588 hasCrashSet (int)? set 1 iff the third optional clip set exists
// @0x5b8 groundCycleRate forward-cycle slew rate, on-ground (-> 0x344)
// @0x5bc airborneCycleRate forward-cycle slew rate, airborne (-> 0x344)
// @0x5c4 clipLoadGuard (int) reset to 0 at the top of a clip load
// @0x5c4 gyroRumbleTimer (float) reset to 0 at the top of a clip load
// @0x5cc animationClips[] (ptr[]) gait-state -> clip handle (mech2); indexed
// by MeasureClipStride
// @0x5d4 crashClipB (ptr) optional-set clip handle
@@ -327,7 +327,7 @@ void
{
const char *prefix = model->animationPrefix; // param_2 + 0x40
clipLoadGuard = 0; // this+0x5c4
gyroRumbleTimer = 0.0f; // this+0x5c4 (float; bit-identical to the old int 0)
// --- stand -> walk : standSpeed is that clip's final-keyframe stride ----
namedClip[ 0] = *ResolveAnimationClip(prefix, "swr"); // 0x5e0