acdream/tests/AcDream.App.Tests/Physics
Erik d233f81dce feat(session): the in-world logoff — LogOut animation, reverse wormhole, live return to character select
Retires AD-74 (Exit to Character Selection 'behaves as Exit Game') and
files AD-110 (the composed handoff edge) — register rows in this commit.

Retail derivation (named decomp):
- gmGamePlayUI::UseTime @0x004EA3A0: confirmed Yes drains into
  CPlayerSystem::LogOffCharacter(0) when grounded (transient_state &
  CONTACT); the grounded three-way branch now also covers the
  indicator-bar end-session control (it was Options-only).
- CPlayerSystem::LogOffCharacter @0x00563520: SaveToServer FIRST (the
  existing pre-logoff flush hook), then RequestLogOff @0x00562DD0:
  'Logging off...' chat (type 0), 0xF653 via Proto_UI::LogOffCharacter
  @0x00546A20, logOffRequestTime = now + 3.0 (+20.0 when
  IsPlayerKiller @0x0058C910 — PWD bits 0x20|0x2000000), and
  CommandInterpreter::HandleLogOff @0x006B3330 -> Disable.
- The log-off ANIMATION is server-driven: ACE broadcasts
  MotionCommand.LogOut (0x1000011E, Player.cs:596 SendMotionAsCommands)
  and it plays on the local player through the existing inbound
  unpack_movement funnel during the 3 s hold — retail plays nothing
  locally; Disable() is the whole client-side effect.
- gmSmartBoxUI::UseTime @0x004D6E64: hold elapsed ->
  BeginTeleportAnimation(TAS_WORLD_FADE_OUT) @0x004D6E83 (enter cue
  @0x004D638E, unconditional) -> TunnelFadeIn -> Tunnel. The tunnel
  plays the SAME forward 40 fps animation; nothing renders backwards,
  and NO exit cue ever fires on logout (the char-select swap preempts
  the TunnelContinue/FadeOut tail).
- Inbound 0xF653 echo (dispatch case 3 @0x0055C963) ->
  ExecuteLogOff @0x0055D780: world teardown with the LOGON CONNECTION
  KEPT (ExitWorldDisconnect @0x00541E00 removes every connection
  except logonRecID_ — one connection against ACE) and
  Proto_UI::SetEventCounter(0) @0x00541E79; the fresh CharacterList in
  the same batch re-shows character management (gmGamePlayUI::Update
  @0x004E9CD0 -> QueueUIMode(0x1000000a)). ACE mirrors it:
  SendFinalLogOffMessages (Session.cs:249) sends 0xF653 + CharacterList
  + ServerName >=6 s after the request and leaves the session
  AuthConnected — a second EnterWorld needs no re-handshake.

Implementation:
- RuntimeWorldTransitState: the canonical logout lifecycle
  (Requested/PresentationActive/Confirmed, retail 3 s/+20 s holds,
  cancel/reset/ownership convergence).
- WorldSession: RequestCharacterLogOff (non-blocking 0xF653),
  IsCharacterLogOffConfirmed, ReturnToCharacterSelect (InWorld ->
  InCharacterSelect + game-action sequence reset; transport untouched).
- LiveSessionController: BeginCharacterLogOff (flush-first request) and
  CompleteCharacterLogOff — the return-to-selection transaction
  (ReconnectCore minus the transport swap: retire the world
  generation's routes, host reset, state flip, fresh generation
  re-bind, roster re-applied from the pushed CharacterList; failures
  degrade to the full StopCore teardown).
- RuntimeLocalPlayerMovementState.DisableCommandInterpreter +
  DispatcherMovementInputSource gate: retail's Disable() — held keys
  produce no movement while the server LogOut motion plays; cleared by
  the generation reset.
- LocalPlayerTeleportController: the logout pump as the third arm of
  the one wormhole machine (request/hold/wormhole/confirmed handoff;
  teleport starts refused during logout; the handoff runs the session
  transaction whose world reset retires the tunnel as the fresh
  selection state re-shows the character screen).
- UI: both end-session surfaces share the retail three-way grounded
  gate and now run the REAL flow; Options' Exit Game keeps the app
  exit (window close -> the existing graceful-shutdown logoff).

Tests: +5 transit lifecycle, +4 session transaction, +7 logout pump.
Runtime 1756/0 (baseline 1747), App live-DAT 5523/3 (baseline 5512/3
+ 11 this round), Core.Net 1004/0, full solution green (0 failures).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-17 14:02:40 +02:00
..
C3cF1ProductionWiringTests.cs feat(runtime): C3c - production placement cutover: both hosts on the residence conductors (routes 1+8) 2026-08-02 18:10:33 +02:00
DeferredLiveEntityMotionRuntimeBindingsTests.cs fix(physics): TS-46 - seed the sweep from the Setup's own sphere list 2026-07-30 09:05:44 +02:00
InboundInterpretedMotionFactoryTests.cs fix(combat): apply server attack motions locally 2026-07-11 13:34:55 +02:00
Issue270ProductionWiringTests.cs feat(runtime): C3c - production placement cutover: both hosts on the residence conductors (routes 1+8) 2026-08-02 18:10:33 +02:00
LiveCollisionAssetPublisherTests.cs feat(streaming): shadow-publish flat collision assets 2026-07-25 16:38:54 +02:00
LiveEntityCollisionBuilderTests.cs refactor(physics): hoist the live-entity collision builder to Runtime (#330 groundwork) 2026-08-07 01:49:13 +02:00
LiveEntityInboundAuthorityGateTests.cs feat(runtime): C3c - production placement cutover: both hosts on the residence conductors (routes 1+8) 2026-08-02 18:10:33 +02:00
LiveEntityMotionRuntimeControllerTests.cs fix(interaction): restore distant use after runtime cutover 2026-08-03 09:36:53 +02:00
LiveEntityNetworkBranchRoutingTests.cs refactor(physics): collapse OnPosition's dual player/NPC remote tail into one 2026-08-04 18:07:54 +02:00
LiveEntityNetworkOnPositionCollapseMatrixTests.cs feat(session): the in-world logoff — LogOut animation, reverse wormhole, live return to character select 2026-08-17 14:02:40 +02:00
LiveEntityNetworkRemoteFarSnapIntegrationTests.cs feat(physics): C4 route 4b-3 — remote teleport + cell-less through the canonical placement 2026-08-04 16:00:10 +02:00
LiveEntityNetworkRemoteSteadyStateIntegrationTests.cs feat(physics): C4 route 4b-3 — remote teleport + cell-less through the canonical placement 2026-08-04 16:00:10 +02:00
LiveEntityNetworkRemoteTeleportPresentationTests.cs feat(session): the in-world logoff — LogOut animation, reverse wormhole, live return to character select 2026-08-17 14:02:40 +02:00
LiveEntityOrdinaryPhysicsUpdaterTests.cs fix(physics): TS-46 - seed the sweep from the Setup's own sphere list 2026-07-30 09:05:44 +02:00
LiveEntityPvpBitfieldSyncTests.cs fix(physics): #297 — keep the PWD bitfield live so PK status reaches the client 2026-08-03 20:59:01 +02:00
PlayerMovementHiddenTests.cs refactor(physics): delete legacy PhysicsEngine.Resolve/ResolvePlacement/HasCellSurface (C5a, AP-1/AD-1) 2026-08-05 14:11:31 +02:00
ProjectileControllerTests.cs fix(physics): C4 route 5 — projectile authoritative placement (#276 partial) 2026-08-04 21:03:41 +02:00
PvpBitfieldSurvivesAppearanceRebuildTests.cs refactor(physics): hoist the live-entity collision builder to Runtime (#330 groundwork) 2026-08-07 01:49:13 +02:00
RemoteInboundMotionDispatcherTests.cs feat(physics): port retail complete object frame pipeline 2026-07-20 09:10:31 +02:00
RemotePhysicsUpdaterTests.cs fix(physics): close the AP-156 fix review — real containment oracle, type-level invariant, AP-158 2026-08-06 16:44:48 +02:00
RemotePlacementDriveFixture.cs fix(physics): route remote Positions on contact, not walkability (AP-140) 2026-08-04 11:53:48 +02:00
RemoteTeleportHookTests.cs feat(vfx): port retail hidden and teleport presentation 2026-07-14 14:59:48 +02:00