v1.2.1: fixed char awareness working after a character dies

This commit is contained in:
Evan Debenham
2022-04-02 14:27:44 -04:00
parent 8ce89a7e24
commit 2827ae4983
2 changed files with 2 additions and 2 deletions

View File

@@ -762,7 +762,7 @@ public class Dungeon {
for (TalismanOfForesight.CharAwareness c : hero.buffs(TalismanOfForesight.CharAwareness.class)){
Char ch = (Char) Actor.findById(c.charID);
if (ch == null) continue;
if (ch == null || !ch.isAlive()) continue;
BArray.or( level.visited, level.heroFOV, ch.pos - 1 - level.width(), 3, level.visited );
BArray.or( level.visited, level.heroFOV, ch.pos - 1, 3, level.visited );
BArray.or( level.visited, level.heroFOV, ch.pos - 1 + level.width(), 3, level.visited );

View File

@@ -1203,7 +1203,7 @@ public abstract class Level implements Bundlable {
for (TalismanOfForesight.CharAwareness a : c.buffs(TalismanOfForesight.CharAwareness.class)){
Char ch = (Char) Actor.findById(a.charID);
if (ch == null) {
if (ch == null || !ch.isAlive()) {
continue;
}
int p = ch.pos;