git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@548 c06c8d41-db1a-0410-9941-cceddc491573
V26TVLNNESUAUJY24SEXIWRQB7A4JJ6TVQU3JVZV54IEEKCB3WOQC
if ((*move_x || *move_y) && you.running == RMODE_EXPLORE_GREEDY)
{
// Greedy explore should cut off on reaching an item. We can't
// check after reaching the item, because at that point the stash
// tracker will have verified the stash and say "false" to
// needs_visit.
const int new_x = you.x_pos + *move_x;
const int new_y = you.y_pos + *move_y;
if (new_x == you.running.x && new_y == you.running.y)
{
const LevelStashes *lev = stashes.find_current_level();
if (lev && lev->needs_visit(new_x, new_y)
&& !lev->shop_needs_visit(new_x, new_y))
{
if ((Options.explore_stop & ES_ITEM)
&& prompt_stop_explore(ES_ITEM))
stop_running();
return direction_to_command( *move_x, *move_y );
}
}
}