diff options
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 } |
