v0.8.1a: fixed corse dust wraiths spawning inside of doors in rare cases
This commit is contained in:
parent
678fd9b787
commit
a534ce020e
|
@ -49,10 +49,6 @@ public class CorpseDust extends Item {
|
||||||
unique = true;
|
unique = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public ArrayList<String> actions(Hero hero) {
|
|
||||||
return new ArrayList<>(); //yup, no dropping this one
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isUpgradable() {
|
public boolean isUpgradable() {
|
||||||
|
@ -105,7 +101,7 @@ public class CorpseDust extends Item {
|
||||||
do{
|
do{
|
||||||
pos = Random.Int(Dungeon.level.length());
|
pos = Random.Int(Dungeon.level.length());
|
||||||
tries --;
|
tries --;
|
||||||
} while (tries > 0 && (!Dungeon.level.heroFOV[pos] || !Dungeon.level.passable[pos] || Actor.findChar( pos ) != null));
|
} while (tries > 0 && (!Dungeon.level.heroFOV[pos] || Dungeon.level.solid[pos] || Actor.findChar( pos ) != null));
|
||||||
if (tries > 0) {
|
if (tries > 0) {
|
||||||
Wraith.spawnAt(pos);
|
Wraith.spawnAt(pos);
|
||||||
Sample.INSTANCE.play(Assets.Sounds.CURSED);
|
Sample.INSTANCE.play(Assets.Sounds.CURSED);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user