Skip to content

Commit

Permalink
experimental fix-thing for stressed stair climbing attempts
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryan Karl committed Jan 28, 2012
1 parent 7018d45 commit 22a78de
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/World.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,10 @@ Tile World::shortestPath(const Coordinate& target) {
continue; // we don't know where these stairs lead
else if (level_added[s->second])
continue; // already added this level
else if (Saiph::encumbrance() >= STRESSED) {
Debug::pathing() << "can't follow upstairs because encumbrance" << endl;
continue;
}
Tile& tile = _levels[level_queue[pivot]].tile(s->first);
if (tile.cost() >= UNPASSABLE)
continue;
Expand Down Expand Up @@ -500,6 +504,10 @@ Tile World::shortestPath(unsigned char symbol) {
continue; // we don't know where these stairs lead
if (level_added[s->second])
continue; // already added this level
else if (Saiph::encumbrance() >= STRESSED) {
Debug::pathing() << "can't follow upstairs because encumbrance" << endl;
continue;
}
Tile& tile = _levels[level_queue[pivot]].tile(s->first);
if (tile.cost() >= UNPASSABLE)
continue;
Expand Down

0 comments on commit 22a78de

Please sign in to comment.