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() {
|
||||
if (Dungeon.hero == null) return;
|
||||
|
||||
for ( Buff invis : Dungeon.hero.buffs( Invisibility.class )){
|
||||
invis.detach();
|
||||
}
|
||||
|
|
|
@ -72,7 +72,7 @@ public class WandOfFrost extends DamageWand {
|
|||
if (eternalFire != null && eternalFire.volume > 0) {
|
||||
eternalFire.clear( bolt.collisionPos );
|
||||
//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) );
|
||||
}
|
||||
|
||||
|
|
|
@ -397,10 +397,12 @@ public class AlchemyScene extends PixelScene {
|
|||
private void combine( int slot ){
|
||||
|
||||
ArrayList<Item> ingredients = filterInput(Item.class);
|
||||
|
||||
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;
|
||||
|
||||
|
|
|
@ -1168,9 +1168,8 @@ public class GameScene extends PixelScene {
|
|||
|
||||
public static void afterObserve() {
|
||||
if (scene != null) {
|
||||
for (Mob mob : Dungeon.level.mobs) {
|
||||
if (mob.sprite != null)
|
||||
mob.sprite.visible = Dungeon.level.heroFOV[mob.pos];
|
||||
for (Mob mob : Dungeon.level.mobs.toArray(new Mob[0])) {
|
||||
if (mob.sprite != null) mob.sprite.visible = Dungeon.level.heroFOV[mob.pos];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -59,16 +59,6 @@ public class GhoulSprite extends MobSprite {
|
|||
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
|
||||
public void die() {
|
||||
if (curAnim == crumple){
|
||||
|
|
|
@ -105,7 +105,7 @@ public class ActionIndicator extends Tag {
|
|||
|
||||
@Override
|
||||
protected String hoverText() {
|
||||
String text = action.actionName();
|
||||
String text = (action == null ? null : action.actionName());
|
||||
if (text != null){
|
||||
return Messages.titleCase(text);
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue
Block a user