v0.6.1b: further fixes for hero searching more often than intended

This commit is contained in:
Evan Debenham 2017-08-22 23:12:43 -04:00
parent 13e0c37c38
commit 786e9cf0ea

View File

@ -483,7 +483,7 @@ public class Hero extends Char {
Dungeon.observe();
}
if (curAction == null || search(false)) {
if (curAction == null) {
if (resting) {
spend( TIME_TO_REST ); next();
@ -1105,6 +1105,8 @@ public class Hero extends Char {
move(step);
spend( moveTime / speed() );
search(false);
//FIXME this is a fairly sloppy fix for a crash involving pitfall traps.
//really there should be a way for traps to specify whether action should continue or
@ -1528,7 +1530,7 @@ public class Hero extends Char {
for (int y = ay; y <= by; y++) {
for (int x = ax, p = ax + y * Dungeon.level.width(); x <= bx; x++, p++) {
if (Dungeon.visible[p]) {
if (Dungeon.visible[p] && p != pos) {
if (intentional) {
sprite.parent.addToBack( new CheckedCell( p ) );