From 786e9cf0eaf48367e6b35d65009f16197611b400 Mon Sep 17 00:00:00 2001 From: Evan Debenham <Evan.SHPX@gmail.com> Date: Tue, 22 Aug 2017 23:12:43 -0400 Subject: [PATCH] v0.6.1b: further fixes for hero searching more often than intended --- .../shatteredpixeldungeon/actors/hero/Hero.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Hero.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Hero.java index b138f64ed..a7efcc28a 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Hero.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Hero.java @@ -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 ) );