diff --git a/src/AcDream.Core/World/TeleportAnimSequencer.cs b/src/AcDream.Core/World/TeleportAnimSequencer.cs index c786ea13..4280ea73 100644 --- a/src/AcDream.Core/World/TeleportAnimSequencer.cs +++ b/src/AcDream.Core/World/TeleportAnimSequencer.cs @@ -55,8 +55,6 @@ public sealed class TeleportAnimSequencer private float _continueElapsed = 0f; // tracks time inside TunnelContinue private bool _enterSoundPending = false; private bool _enterTunnelPending = false; - private bool _exitSoundPending = false; - private bool _loginCompletePending = false; public bool IsActive => _state != TeleportAnimState.Off; public TeleportAnimState State => _state; @@ -74,8 +72,6 @@ public sealed class TeleportAnimSequencer _continueElapsed = 0f; _enterSoundPending = true; _enterTunnelPending = _state == TeleportAnimState.Tunnel; // true for Portal/Login/Death - _exitSoundPending = false; - _loginCompletePending = false; } /// @@ -88,11 +84,10 @@ public sealed class TeleportAnimSequencer { var evts = new List(); - // Edge events queued by Begin or a prior transition: - if (_enterSoundPending) { evts.Add(TeleportAnimEvent.PlayEnterSound); _enterSoundPending = false; } - if (_enterTunnelPending) { evts.Add(TeleportAnimEvent.EnterTunnel); _enterTunnelPending = false; } - if (_exitSoundPending) { evts.Add(TeleportAnimEvent.PlayExitSound); _exitSoundPending = false; } - if (_loginCompletePending) { evts.Add(TeleportAnimEvent.FireLoginComplete); _loginCompletePending = false; } + // Edge events queued by Begin or a prior transition (enter-sound + enter-tunnel only; + // exit-sound and login-complete are emitted inline at their transitions below): + if (_enterSoundPending) { evts.Add(TeleportAnimEvent.PlayEnterSound); _enterSoundPending = false; } + if (_enterTunnelPending) { evts.Add(TeleportAnimEvent.EnterTunnel); _enterTunnelPending = false; } _elapsed += dt; @@ -121,6 +116,9 @@ public sealed class TeleportAnimSequencer case TeleportAnimState.TunnelContinue: _continueElapsed += dt; + // worldReady stays true once the landblock loads, so this advances at the 2s + // minimum in the normal case; gating min-advance on worldReady keeps the + // MaxContinue safety net authoritative if readiness ever regresses mid-continue. bool minMet = worldReady && _continueElapsed >= MinContinue; bool maxForce = _continueElapsed >= MaxContinue; if (minMet || maxForce) @@ -131,9 +129,7 @@ public sealed class TeleportAnimSequencer if (_elapsed >= FadeTime) { Advance(TeleportAnimState.WorldFadeIn, enterTunnel: false); - // Flush exit sound in the same tick: evts.Add(TeleportAnimEvent.PlayExitSound); - _exitSoundPending = false; } break; @@ -142,7 +138,6 @@ public sealed class TeleportAnimSequencer { Advance(TeleportAnimState.Off, enterTunnel: false); evts.Add(TeleportAnimEvent.FireLoginComplete); - _loginCompletePending = false; } break;