summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/travel.cc
diff options
context:
space:
mode:
authorNeil Moore <neil@s-z.org>2013-10-02 19:14:18 -0400
committerNeil Moore <neil@s-z.org>2013-10-02 19:14:18 -0400
commit3b2d4cbffc3f65e033d750eda4d4a06e0fa9ed79 (patch)
treec6b40cac6e1bd9c9ec9cd5289a9029c206c777b8 /crawl-ref/source/travel.cc
parent49fe655fa5722484f3862c827b62226b73c90422 (diff)
downloadcrawl-ref-3b2d4cbffc3f65e033d750eda4d4a06e0fa9ed79.tar.gz
crawl-ref-3b2d4cbffc3f65e033d750eda4d4a06e0fa9ed79.zip
Use RMODE_CONNECTIVITY for monster placement.
Diffstat (limited to 'crawl-ref/source/travel.cc')
-rw-r--r--crawl-ref/source/travel.cc16
1 files changed, 11 insertions, 5 deletions
diff --git a/crawl-ref/source/travel.cc b/crawl-ref/source/travel.cc
index 9cca82627a..5719315451 100644
--- a/crawl-ref/source/travel.cc
+++ b/crawl-ref/source/travel.cc
@@ -44,6 +44,7 @@
#include "religion.h"
#include "stairs.h"
#include "stash.h"
+#include "state.h"
#include "stuff.h"
#include "tags.h"
#include "terrain.h"
@@ -1294,11 +1295,16 @@ coord_def travel_pathfind::pathfind(run_mode_type rmode, bool fallback_explore)
if (runmode == RMODE_CONNECTIVITY)
ignore_player_traversability = true;
- else if (runmode == RMODE_EXPLORE_GREEDY)
- {
- autopickup = can_autopickup();
- sacrifice = god_likes_items(you.religion, true);
- need_for_greed = (autopickup || sacrifice);
+ else {
+ ASSERTM(crawl_state.need_save,
+ "Pathfind with mode %d without a game?", runmode);
+
+ if (runmode == RMODE_EXPLORE_GREEDY)
+ {
+ autopickup = can_autopickup();
+ sacrifice = god_likes_items(you.religion, true);
+ need_for_greed = (autopickup || sacrifice);
+ }
}
if (!ls && (annotate_map || need_for_greed))