fix(teleport): preserve dungeon cell identity on respawn (#215)

Classify teleport landblock transitions from the source and destination Position cell IDs instead of render-space coordinates. This keeps same-dungeon death respawns on their resident floor physics while preserving the existing true cross-landblock streaming path.

Co-Authored-By: Codex <noreply@openai.com>
This commit is contained in:
Erik 2026-07-13 20:08:21 +02:00
parent b0c175afc0
commit 0ad6700a07
7 changed files with 296 additions and 9 deletions

View file

@ -46,6 +46,46 @@ Copy this block when adding a new issue:
---
## #215 — Same-dungeon death respawn removed the dungeon floor physics
**Status:** IN-PROGRESS — root fix implemented; Release build + 5,054 tests green, pending user gate
**Severity:** HIGH
**Component:** teleport / streaming / physics cell identity
**Description:** After `/die` in the starter dungeon, the character respawned
at the dungeon start but fell through the world as soon as movement began.
**Root cause:** `OnLivePositionUpdated` decided whether a teleport crossed a
landblock by flooring the player's render-space XYZ against the current
streaming center. Dungeon EnvCells can have valid negative local frame origins;
at the captured `0x8C0401AD` position, Y `-30.4 m` falsely reconstructed source
landblock Y `3` instead of authoritative Y `4`. The same-cell respawn was
therefore treated as cross-landblock travel, and the `0x8C04FFFF` floor physics
was removed. Streaming still considered that collapsed landblock resident, so
the idempotent dungeon gate correctly did not enqueue a duplicate load.
**Resolution:** A dedicated `TeleportLandblockTransition` now compares the
player controller's current cell ID with the received destination cell ID,
matching retail's complete `Position::objcell_id + Frame` flow. XYZ is not used
for teleport identity. A zero pre-placement source falls back to the current
streaming-center ID, never a coordinate inference. Same-landblock respawns keep
the resident physics; true cross-landblock teleports retain the existing
recenter and hydration path.
**Files:** `src/AcDream.App/Streaming/TeleportLandblockTransition.cs`;
`src/AcDream.App/Rendering/GameWindow.cs`;
`tests/AcDream.App.Tests/Streaming/TeleportLandblockTransitionTests.cs`.
**Research:**
`docs/research/2026-07-13-same-dungeon-respawn-landblock-identity-pseudocode.md`.
**Acceptance:** In the starter dungeon, use `/die`, confirm the death dialog,
respawn in `0x8C0401AD`, then move in several directions. The character remains
on the dungeon floor and the teleport log reports old/new landblock `(140,4)`
without a physics removal or ten-second readiness timeout.
---
## #214 — Dungeon login could replace a complete EnvCell render with a partial second load
**Status:** IN-PROGRESS — architectural fix complete 2026-07-13, pending user visual gate