When entering an interior (e.g. lab from town), the game saves the player's current position as a return point. When exiting, if the exit has no explicit targetX/targetY, the system pops the stored return point and warps back to that exact position. This means interior exits just need targetMap — the player always returns to the specific door they entered from, not a hardcoded position. Falls back to the destination map's spawn if no return point is stored. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
5.1 KiB
5.1 KiB