From d459948cef28e17a4008352da97eeb43dd58f93e Mon Sep 17 00:00:00 2001 From: zelgadis Date: Mon, 17 Dec 2007 10:03:47 +0000 Subject: Experimental "improved" explore algorithm which can be turned on by adding "explore_improved=true" to crawlrc. The intent is to reduce backtracking and zig-zagging during auto-explore. Currently only works with non-greedy explore since I can't yet figure out how to intelligently combine it with greediness. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3084 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/files.cc | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'crawl-ref/source/files.cc') diff --git a/crawl-ref/source/files.cc b/crawl-ref/source/files.cc index 1cd9febc60..049f410a39 100644 --- a/crawl-ref/source/files.cc +++ b/crawl-ref/source/files.cc @@ -909,6 +909,10 @@ bool load( dungeon_feature_type stair_taken, load_mode_type load_mode, you.transit_stair, stair_taken, DNGN_UNSEEN); unwind_bool ylev(you.entering_level, true, false); + // Going up/down stairs, going through a portal, or being banished + // means the previous x/y movement direction is no longer valid. + you.reset_prev_move(); + const bool make_changes = (load_mode != LOAD_RESTART_GAME && load_mode != LOAD_VISITOR); -- cgit v1.2.3-54-g00ecf