Skip to content

Commit

Permalink
Call shift_monsters after shifting in long teleport function
Browse files Browse the repository at this point in the history
Compare with game::update_map - the code in shift_monsters assumes that levx and levy already point to the *new* coordinates.
  • Loading branch information
BevapDin committed Aug 12, 2014
1 parent c9ff498 commit 4f40f7f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/game.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 4f40f7f

Please sign in to comment.