v2.0.2: fixed downed ghoul sprites not updating on observe
This commit is contained in:
@@ -238,8 +238,6 @@ public class Ghoul extends Mob {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean act() {
|
public boolean act() {
|
||||||
ghoul.sprite.visible = Dungeon.level.heroFOV[ghoul.pos];
|
|
||||||
|
|
||||||
if (target.alignment != ghoul.alignment){
|
if (target.alignment != ghoul.alignment){
|
||||||
detach();
|
detach();
|
||||||
return true;
|
return true;
|
||||||
@@ -302,6 +300,12 @@ public class Ghoul extends Mob {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void updateVisibility(){
|
||||||
|
if (ghoul != null && ghoul.sprite != null){
|
||||||
|
ghoul.sprite.visible = Dungeon.level.heroFOV[ghoul.pos];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void set(int turns, Ghoul ghoul){
|
public void set(int turns, Ghoul ghoul){
|
||||||
this.ghoul = ghoul;
|
this.ghoul = ghoul;
|
||||||
turnsToRevive = turns;
|
turnsToRevive = turns;
|
||||||
|
|||||||
@@ -39,6 +39,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.ChampionEnemy;
|
|||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Talent;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Talent;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.DemonSpawner;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.DemonSpawner;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Ghoul;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mob;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mob;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Snake;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Snake;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.effects.BannerSprites;
|
import com.shatteredpixel.shatteredpixeldungeon.effects.BannerSprites;
|
||||||
@@ -1243,6 +1244,11 @@ public class GameScene extends PixelScene {
|
|||||||
if (scene != null) {
|
if (scene != null) {
|
||||||
for (Mob mob : Dungeon.level.mobs.toArray(new Mob[0])) {
|
for (Mob mob : Dungeon.level.mobs.toArray(new Mob[0])) {
|
||||||
if (mob.sprite != null) mob.sprite.visible = Dungeon.level.heroFOV[mob.pos];
|
if (mob.sprite != null) mob.sprite.visible = Dungeon.level.heroFOV[mob.pos];
|
||||||
|
if (mob instanceof Ghoul){
|
||||||
|
for (Ghoul.GhoulLifeLink link : mob.buffs(Ghoul.GhoulLifeLink.class)){
|
||||||
|
link.updateVisibility();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user