fix(render): harden portal exit handoff
This commit is contained in:
parent
ddbd7e4096
commit
82e4b4cb6d
17 changed files with 896 additions and 119 deletions
|
|
@ -468,7 +468,7 @@ public sealed class LocalPlayerTeleportControllerTests
|
|||
}
|
||||
|
||||
[Fact]
|
||||
public void ExitSound_ReleasesDestinationBeforeHidingTunnelButKeepsProtocolActive()
|
||||
public void ExitSound_HidesTunnelBeforeReleasingDestinationAndKeepsProtocolActive()
|
||||
{
|
||||
var order = new List<string>();
|
||||
var harness = new Harness(order: order);
|
||||
|
|
@ -481,6 +481,8 @@ public sealed class LocalPlayerTeleportControllerTests
|
|||
|
||||
harness.Controller.Tick(0.016f);
|
||||
|
||||
Assert.True(Index(order, "presentation-exit") < Index(order, "reservation-end"));
|
||||
Assert.True(Index(order, "reservation-end") < Index(order, "exit-cue"));
|
||||
Assert.False(harness.Presentation.IsPortalViewportVisible);
|
||||
Assert.True(harness.Controller.IsActive);
|
||||
Assert.False(harness.Reveal.Snapshot.Completed);
|
||||
|
|
@ -1589,10 +1591,13 @@ public sealed class LocalPlayerTeleportControllerTests
|
|||
harness.Controller.Tick(0.016f);
|
||||
Assert.False(harness.Placement.Called);
|
||||
|
||||
// Viewport swap: reservation release + exit cue + tunnel retire
|
||||
// Viewport swap: tunnel retire, reservation release, then exit cue
|
||||
// (gmSmartBoxUI::UseTime, Sound_UI_ExitPortal @ 0x004D7405).
|
||||
order.Clear();
|
||||
harness.Presentation.Enqueue(TeleportAnimEvent.PlayExitSound);
|
||||
harness.Controller.Tick(0.016f);
|
||||
Assert.True(Index(order, "presentation-exit") < Index(order, "reservation-end"));
|
||||
Assert.True(Index(order, "reservation-end") < Index(order, "exit-cue"));
|
||||
Assert.Equal(["enter", "exit"], harness.Presentation.Cues);
|
||||
Assert.False(harness.Presentation.IsPortalViewportVisible);
|
||||
Assert.Single(harness.Streaming.ReservationEnds);
|
||||
|
|
@ -2126,9 +2131,17 @@ public sealed class LocalPlayerTeleportControllerTests
|
|||
public void TickTunnel(float deltaSeconds) => _order.Add("tunnel-tick");
|
||||
public readonly List<string> Cues = new();
|
||||
public void PlayEnterCue() => Cues.Add("enter");
|
||||
public void PlayExitCue() => Cues.Add("exit");
|
||||
public void PlayExitCue()
|
||||
{
|
||||
Cues.Add("exit");
|
||||
_order.Add("exit-cue");
|
||||
}
|
||||
public void EnterTunnel() => IsPortalViewportVisible = true;
|
||||
public void ExitTunnel() => IsPortalViewportVisible = false;
|
||||
public void ExitTunnel()
|
||||
{
|
||||
IsPortalViewportVisible = false;
|
||||
_order.Add("presentation-exit");
|
||||
}
|
||||
public void SetWaitCue(bool visible) => WaitCueValues.Add(visible);
|
||||
|
||||
public void Reset()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue