Audio Phase 1 (AUDIO_FIDELITY F3/F4/F10/F15/F18/F20 + KB): the quick wins
F3 distance: alDistanceModel(AL_NONE); restored the commented authored distance multiply in Dynamic3D::CalculateSourceVolumeScale, added the same override to Static3D, dropped the (now inert) AL_MAX_DISTANCE writes. Far battle audio follows the authored knee/rolloff curve again, and the volume cull / voice steal / ducking chains are distance-aware. F4 volume law: AL_GAIN = volume_scale^2 at all 3 per-frame sites (Direct/ Dyn3D/Static3D) -- the GM CC7 squared curve; linear was ~+6 dB at mids. F10 doppler: alDopplerFactor(0) (AL's model ran wrong constants + sign- inverted velocity: approaching sources pitched DOWN); the AUTHORED dopplerCents (AUDIO.INI range/speed-of-sound model, decomp-proven consumer part_008.c:7466) now adds into the Dynamic3D pitch chain. F15 ConfigureActivePress: published at the MechSubsystem BASE (binary id 2, descriptor @0x50de5c -> +0x110); renamed the misnamed vitalSubsystemIndex member (the weapon ConfigureMappables handler already drives it 0/-1). Removed the invented Sensor/Myomers duplicates and RESTORED their byte- exact layouts (0x328/0x358 allocs + asserts). MechWeapon's pinned-id pad absorbed the +1 chain shift -- which matches the binary's own numbering. F18 cook-off warning: AmmoBin FireCountdownStarted -> the existing cookOffArmed @0x18C (binary table @0x512600); the countdown klaxon can fire. F20 zoom blip: L4MechControlsMapper publishes TargetRangeExponent -> the live @0x1a4 zoom member (own table chained to MechControlsMapper). KB: replaced the bogus divisionParameters+0x10 rate read with SystemClock::GetTicksPerSecond() (FUN_0044e19c is GetFrameRate -- original audio frames were CLOCK TICKS). Regression (35s drive+fire): stable; ConfigureActivePress binds real on all 9 subsystems (idle -1, zero pad redirects); FireCountdownStarted + TargetRangeExponent bind live members; attrnull 53 -> 41; chirp still dead; footfalls still fire (gain now correctly squared). 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
05cb3f5549
commit
fc7f311771
@@ -126,15 +126,13 @@ const MechWeapon::IndexEntry
|
||||
// The five PADS fill our chain-vs-binary id gap (0x0D..0x11) with valid,
|
||||
// named, never-bound entries (the binary's own ids here are the powered/
|
||||
// aux-screen family we don't publish); target = rechargeLevel, harmless.
|
||||
{ (int)MechWeapon::MechWeaponPadFirstAttributeID + 0, "MechWeaponPad0D",
|
||||
{ (int)MechWeapon::MechWeaponPadFirstAttributeID + 0, "MechWeaponPad0E",
|
||||
(Simulation::AttributePointer)&MechWeapon::rechargeLevel },
|
||||
{ (int)MechWeapon::MechWeaponPadFirstAttributeID + 1, "MechWeaponPad0E",
|
||||
{ (int)MechWeapon::MechWeaponPadFirstAttributeID + 1, "MechWeaponPad0F",
|
||||
(Simulation::AttributePointer)&MechWeapon::rechargeLevel },
|
||||
{ (int)MechWeapon::MechWeaponPadFirstAttributeID + 2, "MechWeaponPad0F",
|
||||
{ (int)MechWeapon::MechWeaponPadFirstAttributeID + 2, "MechWeaponPad10",
|
||||
(Simulation::AttributePointer)&MechWeapon::rechargeLevel },
|
||||
{ (int)MechWeapon::MechWeaponPadFirstAttributeID + 3, "MechWeaponPad10",
|
||||
(Simulation::AttributePointer)&MechWeapon::rechargeLevel },
|
||||
{ (int)MechWeapon::MechWeaponPadFirstAttributeID + 4, "MechWeaponPad11",
|
||||
{ (int)MechWeapon::MechWeaponPadFirstAttributeID + 3, "MechWeaponPad11",
|
||||
(Simulation::AttributePointer)&MechWeapon::rechargeLevel },
|
||||
ATTRIBUTE_ENTRY(MechWeapon, PercentDone, rechargeLevel), // 0x12 @0x320
|
||||
ATTRIBUTE_ENTRY(MechWeapon, TriggerState, fireImpulse), // 0x13 @0x31C
|
||||
@@ -183,7 +181,7 @@ MechWeapon::SharedData
|
||||
// Release: close the session (mode restored, temp layer stripped).
|
||||
// The +0x110 write (0 open / -1 idle) is the binary's config-session flag
|
||||
// (ctor default -1, part_012.c:15775); the port field carries the older name
|
||||
// vitalSubsystemIndex -- no confirmed reader yet (read-site survey pending).
|
||||
// configureActivePress -- the reader is the authored audio configure ticker (F15).
|
||||
//
|
||||
void
|
||||
MechWeapon::ConfigureMappablesMessageHandler(
|
||||
@@ -205,11 +203,11 @@ void
|
||||
if (value < 1)
|
||||
{
|
||||
mapper->ExitConfiguration(element); // vtbl+0x3C
|
||||
vitalSubsystemIndex = -1; // this+0x110 -> idle
|
||||
configureActivePress = -1; // this+0x110 -> idle (audio ticker OFF)
|
||||
}
|
||||
else
|
||||
{
|
||||
vitalSubsystemIndex = 0; // this+0x110 -> session open
|
||||
configureActivePress = 0; // this+0x110 -> session open (audio ticker ON)
|
||||
mapper->EnterConfiguration( // vtbl+0x38
|
||||
element,
|
||||
(ControlsButton *)&fireImpulse, // this+0x31C (TriggerState)
|
||||
|
||||
Reference in New Issue
Block a user