diff options
| author | historia <[not public]> | 2026-10-06 12:57:23 -0400 |
|---|---|---|
| committer | historia <[not public]> | 2026-10-06 12:57:23 -0400 |
| commit | 9666676766bf21364f4fc4d0d1d336e72f2a91b4 (patch) | |
| tree | 0cade34091d7602790dc38cd44053f0b74bbadf2 /internal/game/exit_migrate.go | |
| parent | 4bc1daaf259e0c19c5fe4a12ec8bc7f6e5a735c1 (diff) | |
| download | thehouseoficarus-9666676766bf21364f4fc4d0d1d336e72f2a91b4.tar.gz | |
refactor: split casino.go, dedup helpers, remove audit docs
Diffstat (limited to 'internal/game/exit_migrate.go')
| -rw-r--r-- | internal/game/exit_migrate.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/internal/game/exit_migrate.go b/internal/game/exit_migrate.go index 4edab95..4f5dd72 100644 --- a/internal/game/exit_migrate.go +++ b/internal/game/exit_migrate.go @@ -25,6 +25,15 @@ func rewritePlayerRoomIDs(p *player.Player, idMap map[int]int) bool { if world.RemapInt(idMap, &p.RoomID) { changed = true } + // A multi-tick move or a stashed flee escape keeps its destination in + // MoveTarget/EscapeTarget; remap them too or completeMove will assign a + // pre-migration room ID with no existence check. + if world.RemapInt(idMap, &p.MoveTarget) { + changed = true + } + if world.RemapInt(idMap, &p.EscapeTarget) { + changed = true + } if p.PendingSequence != nil && p.PendingSequence.RoomID != 0 && world.RemapInt(idMap, &p.PendingSequence.RoomID) { changed = true } |
