v1.2.3: fixed various rare crash bugs
This commit is contained in:
parent
5f4b2560d4
commit
8153077f5e
|
@ -88,6 +88,8 @@ public class Invisibility extends FlavourBuff {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void dispel() {
|
public static void dispel() {
|
||||||
|
if (Dungeon.hero == null) return;
|
||||||
|
|
||||||
for ( Buff invis : Dungeon.hero.buffs( Invisibility.class )){
|
for ( Buff invis : Dungeon.hero.buffs( Invisibility.class )){
|
||||||
invis.detach();
|
invis.detach();
|
||||||
}
|
}
|
||||||
|
|
|
@ -72,7 +72,7 @@ public class WandOfFrost extends DamageWand {
|
||||||
if (eternalFire != null && eternalFire.volume > 0) {
|
if (eternalFire != null && eternalFire.volume > 0) {
|
||||||
eternalFire.clear( bolt.collisionPos );
|
eternalFire.clear( bolt.collisionPos );
|
||||||
//bolt ends 1 tile short of fire, so check next tile too
|
//bolt ends 1 tile short of fire, so check next tile too
|
||||||
if (bolt.path.size() > bolt.dist){
|
if (bolt.path.size() > bolt.dist+1){
|
||||||
eternalFire.clear( bolt.path.get(bolt.dist+1) );
|
eternalFire.clear( bolt.path.get(bolt.dist+1) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -397,10 +397,12 @@ public class AlchemyScene extends PixelScene {
|
||||||
private void combine( int slot ){
|
private void combine( int slot ){
|
||||||
|
|
||||||
ArrayList<Item> ingredients = filterInput(Item.class);
|
ArrayList<Item> ingredients = filterInput(Item.class);
|
||||||
|
|
||||||
if (ingredients.isEmpty()) return;
|
if (ingredients.isEmpty()) return;
|
||||||
|
|
||||||
Recipe recipe = Recipe.findRecipes(ingredients).get(slot);
|
ArrayList<Recipe> recipes = Recipe.findRecipes(ingredients);
|
||||||
|
if (recipes.size() <= slot) return;
|
||||||
|
|
||||||
|
Recipe recipe = recipes.get(slot);
|
||||||
|
|
||||||
Item result = null;
|
Item result = null;
|
||||||
|
|
||||||
|
|
|
@ -1168,9 +1168,8 @@ public class GameScene extends PixelScene {
|
||||||
|
|
||||||
public static void afterObserve() {
|
public static void afterObserve() {
|
||||||
if (scene != null) {
|
if (scene != null) {
|
||||||
for (Mob mob : Dungeon.level.mobs) {
|
for (Mob mob : Dungeon.level.mobs.toArray(new Mob[0])) {
|
||||||
if (mob.sprite != null)
|
if (mob.sprite != null) mob.sprite.visible = Dungeon.level.heroFOV[mob.pos];
|
||||||
mob.sprite.visible = Dungeon.level.heroFOV[mob.pos];
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -59,16 +59,6 @@ public class GhoulSprite extends MobSprite {
|
||||||
play(crumple);
|
play(crumple);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void move(int from, int to) {
|
|
||||||
if (parent == null){
|
|
||||||
//TODO this should be fixed as of v1.2.2, monitor for more reports and remove if we're clear
|
|
||||||
Game.reportException(new RuntimeException("ghoul sprite tried to move with null parent! ghoul HP: " + ch.HP));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
super.move(from, to);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void die() {
|
public void die() {
|
||||||
if (curAnim == crumple){
|
if (curAnim == crumple){
|
||||||
|
|
|
@ -105,7 +105,7 @@ public class ActionIndicator extends Tag {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected String hoverText() {
|
protected String hoverText() {
|
||||||
String text = action.actionName();
|
String text = (action == null ? null : action.actionName());
|
||||||
if (text != null){
|
if (text != null){
|
||||||
return Messages.titleCase(text);
|
return Messages.titleCase(text);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user