Audio Phase 4c (AUDIO_FIDELITY F17/F19): impact scaling + the authored footstep feed
F17 CollisionSpeed (binary id 24 @0x4B4): real member captured as |worldLinearVelocity| when the contact accumulator arms (0->1) -- the authored AttackVolume [0.9,1] / Brightness [0.7,1] scales over impact speed [0,25] now make harder hits sound louder and brighter. ReduceButton (id 46 @0x340): real watchable member (the keyboard rig never presses it). UnstablePercentage stays deferred: its sway/overspeed model @0x3F0 is the known gyro-ledger gap (live writer unexported); binding without the model would be a stand-in. F19 footstep feed (the invention is dead, long live the authored chain): new [motionscalecfg/motiontrigcfg] traces recovered the authored configs -- EVERY motion watcher extracts |linearMotion| (motionValue=3); the footstep volume mixer is fed by LocalAcceleration [0,10] -> ctl100 (per-stride kick) + LocalVelocity [0,0.6] -> ctl101 (0.4 base while moving). The port never wrote Mover::localAcceleration, so ctl100 read 0 and the old mech2.cpp step-intensity broadcast (patch-sniffing, invented curve) fought the live authored scale. Now: localAcceleration.linear = d(published velocity)/dt -- EXACTLY the binary's derivation ((avgVel - prev)/avgDt into +0x1e4, part_012.c:15186-15195) -- and the broadcast is REMOVED. Regression (30s, walk throttle): stable; footfalls deliver through the wholly-authored chain with per-stride VARYING gains (0.61/0.72/0.62 -- real step dynamics, impossible under the old constant-curve invention). 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
21378ec132
commit
9dcb4752de
@@ -3692,8 +3692,23 @@ void
|
||||
// velocity the same way; this filter reconstructs that stage.
|
||||
{
|
||||
Scalar alpha = dt / (dt + 0.25f);
|
||||
Scalar fwdPrev = fwdSpeedFiltered;
|
||||
Scalar vertPrev = vertSpeedFiltered;
|
||||
fwdSpeedFiltered += alpha * (fwdSpeed - fwdSpeedFiltered);
|
||||
vertSpeedFiltered += alpha * (worldLinearVelocity.y - vertSpeedFiltered);
|
||||
// (AUDIO_FIDELITY F19) publish localAcceleration EXACTLY as the
|
||||
// binary does: the derivative of the (averaged) published
|
||||
// velocity (part_012.c:15186-15195 -- (avgVel - prev)/avgDt into
|
||||
// localAcceleration.linear). The AUTHORED footstep chain reads
|
||||
// |localAcceleration.linear| [0,10] -> mixer ctl100 (the
|
||||
// per-stride kick) on top of |localVelocity| [0,0.6] -> ctl101
|
||||
// (the 0.4 moving base); with this member never written the
|
||||
// kick input read 0 and step volume lost its dynamics.
|
||||
if (dt > 1.0e-4f)
|
||||
localAcceleration.linearMotion = Vector3D(
|
||||
0.0f,
|
||||
(vertSpeedFiltered - vertPrev) / dt,
|
||||
-((fwdSpeedFiltered - fwdPrev) / dt));
|
||||
}
|
||||
localVelocity.linearMotion = Vector3D(0.0f, vertSpeedFiltered, -fwdSpeedFiltered);
|
||||
localVelocity.angularMotion = Vector3D(0.0f, turn * authTurnRate, 0.0f);
|
||||
@@ -5781,7 +5796,14 @@ void
|
||||
// impact, so accumulate InitialHit(1) -- the decomp's dominant `else` branch;
|
||||
// upgrade to the full 1-vs-2 split once 0x240/0x244 are reconstructed. [T3]
|
||||
if (collisionTemporaryState == 0)
|
||||
{
|
||||
collisionTemporaryState = 1;
|
||||
// (AUDIO_FIDELITY F17) capture the impact speed for the authored
|
||||
// CollisionSpeed volume/brightness scales ([0,25] -> harder hits
|
||||
// sound louder + brighter). |worldLinearVelocity| at the arming
|
||||
// contact = the impact speed.
|
||||
collisionSpeed = worldLinearVelocity.Length();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user