From 4f40f7f94d67ce73f129d7f6a489fc1eade57096 Mon Sep 17 00:00:00 2001 From: Thomas Kirsten Date: Tue, 12 Aug 2014 12:00:32 +0200 Subject: [PATCH] Call shift_monsters after shifting in long teleport function Compare with game::update_map - the code in shift_monsters assumes that levx and levy already point to the *new* coordinates. --- src/game.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/game.cpp b/src/game.cpp index 41004698e62bf..37a212248aa6b 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -4396,13 +4396,13 @@ void game::debug() m.vehicle_list.clear(); const int nlevx = tmp.x * 2 - int(MAPSIZE / 2); const int nlevy = tmp.y * 2 - int(MAPSIZE / 2); - // TODO: make this use the normal map shifting function all the time? - shift_monsters( nlevx - levx, nlevy - levy, tmp.z - levz ); cur_om = &overmap_buffer.get_om_global(tmp.x, tmp.y); levx = nlevx - cur_om->pos().x * OMAPX * 2; levy = nlevy - cur_om->pos().y * OMAPY * 2; levz = tmp.z; m.load(levx, levy, levz, true, cur_om); + // TODO: make this use the normal map shifting function all the time? + shift_monsters( nlevx - levx, nlevy - levy, tmp.z - levz ); load_npcs(); m.spawn_monsters(); // Static monsters update_overmap_seen();