diff options
Diffstat (limited to 'internal/game/cmd_swapid.go')
| -rw-r--r-- | internal/game/cmd_swapid.go | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/internal/game/cmd_swapid.go b/internal/game/cmd_swapid.go index ef862b9..9ee832a 100644 --- a/internal/game/cmd_swapid.go +++ b/internal/game/cmd_swapid.go @@ -141,12 +141,13 @@ func (g *Game) executeSwapID(sess *net.Session, args []string, rawInput string) updated++ } - // Migrate room-ID-embedded state across all characters (online + offline): - // discovered-exit player flags, current RoomID, EnterSeqRoom, MapSymbols, - // and RoomsVisited. This is what the player asked for — without it, - // swapid leaves every character's hidden_exit_<id>_<dir> flags (and more) - // pointing at stale room IDs. - g.RewriteRoomIDs(idMap) + // Full runtime migration: Hub room buckets, casino room keys, world + // room-keyed state (ground items, seeded markers, object states), live + // mob instances, the room index, and every character's embedded room-ID + // state. Without this, a swap leaves live gameplay attached to the old + // locations until restart. This runs on the owner (swapid is executed + // from the owner command loop) and must not dispatch again. + g.MigrateRoomIDsOnOwner(idMap) sess.WriteLine(fmt.Sprintf("Swapped room IDs %d and %d (%d files updated).", id1, id2, updated)) } |
