fix(audio): listening-gate round 1 — tunnel interior sound + ambience in houses (#355 gate)
Two user findings from the Campaign A listening session. 1. The portal tunnel's in-flight sound was silent while its enter/exit cues played. The tunnel's authored SoundTweakedHook drained into the world 3-D path at its synthetic owner's origin (0,0,0) — after A2 that dies twice: the listener is usually beyond the -50 dB no-allocate radius, and the world pool is suspended for the whole transit hold. The cues the user COULD hear were on the interface bus, which has neither problem, and retail's tunnel is gmSmartBoxUI — UI-owned — so that bus is also the faithful route. UiPresentationHookSink now wraps the shared router for the tunnel: sound-bearing hooks go from-centre through the interface bus (AudioHookSink.OnUiHook); every other hook kind still reaches the particle/lighting/translucency sinks unchanged. 2. Ambience cut dead inside houses; retail keeps the outdoor soundscape in sky-lit interiors. This is TS-66, now retired: the ambient listener source resolves the per-cell CEnvCell.seen_outside bit through the physics cache (the same #107 field AdjustPosition reads) and converts the envcell-local origin through the cell's WorldTransform into landblock coordinates before the 3x3 walk centres on it — an outdoor Position's origin is already landblock-local, an envcell's is cell-local, and skipping that conversion would centre the walk wrongly by up to a landblock. A not-yet-resident cell record resolves to silence for that rebuild rather than a wrong walk. Sealed dungeons stay silent, which is retail-correct. The user also reports interiors carrying their own local sound in retail (hearth-type emitters). Statics already register their sound tables and route animation hooks, so the expectation is that the seen_outside fix plus existing emitters covers it; re-listen decides, and anything still missing becomes a precise follow-up. Full Release suite: 11,740 passed / 4 skipped / 0 failed. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
parent
78b981cca0
commit
e5ade796ac
6 changed files with 159 additions and 14 deletions
|
|
@ -815,7 +815,21 @@ internal sealed class SessionPlayerCompositionPhase
|
|||
ambient.InstallRegion(region, LoadTerrainWords);
|
||||
return new AmbientFramePhase(
|
||||
ambient,
|
||||
new LocalPlayerAmbientListenerSource(d.PlayerController));
|
||||
new LocalPlayerAmbientListenerSource(
|
||||
d.PlayerController,
|
||||
indoorLandblockLocal: (cellId, cellLocal) =>
|
||||
{
|
||||
// seen_outside interiors keep the outdoor ambient set
|
||||
// (TS-66). The cell's WorldTransform maps its local
|
||||
// frame into landblock coordinates, which is the frame
|
||||
// the ambient walk centres on.
|
||||
var cellStruct = d.PhysicsDataCache.GetCellStruct(cellId);
|
||||
if (cellStruct is null || !cellStruct.SeenOutside)
|
||||
return null;
|
||||
return System.Numerics.Vector3.Transform(
|
||||
cellLocal,
|
||||
cellStruct.WorldTransform);
|
||||
}));
|
||||
|
||||
ushort[]? LoadTerrainWords(uint landblockId)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue