diff --git a/src/game.cc b/src/game.cc index 62a3eaa..8aface6 100644 --- a/src/game.cc +++ b/src/game.cc @@ -80,16 +80,15 @@ character *game::move_enemies() { } } - if (the_world) - return nullptr; - - for (auto ch : enemies) { if (ch->is_dead()) { levels[curr_level]->erase_enemy(ch); continue; } + if (the_world && !is_adjacent(ch->get_pos(), player->get_pos())) + continue; + bool hostile = ch->get_race() == MERCHANT ? hostile_merchants : true; auto res =