v0.9.3: fixed various crash bugs

This commit is contained in:
Evan Debenham 2021-05-22 21:18:32 -04:00
parent ff8264a528
commit f31694420a
3 changed files with 7 additions and 4 deletions

View File

@ -544,8 +544,11 @@ public class YogDzewa extends Mob {
fistSummons.clear();
Collections.addAll(fistSummons, bundle.getClassArray(FIST_SUMMONS));
challengeSummons.clear();
Collections.addAll(challengeSummons, bundle.getClassArray(CHALLENGE_SUMMONS));
//pre-0.9.3 saves
if (bundle.contains(CHALLENGE_SUMMONS)) {
challengeSummons.clear();
Collections.addAll(challengeSummons, bundle.getClassArray(CHALLENGE_SUMMONS));
}
regularSummons.clear();
Collections.addAll(regularSummons, bundle.getClassArray(REGULAR_SUMMONS));

View File

@ -334,7 +334,7 @@ public class CavesBossLevel extends Level {
}
public void eliminatePylon(){
customArenaVisuals.updateState();
if (customArenaVisuals != null) customArenaVisuals.updateState();
int pylonsRemaining = 0;
for (Mob m : mobs){
if (m instanceof DM300){

View File

@ -92,7 +92,7 @@ public class GooSprite extends MobSprite {
play(pump);
Sample.INSTANCE.play( Assets.Sounds.CHARGEUP, 1f, warnDist == 1 ? 0.8f : 1f );
for (int i = 0; i < Dungeon.level.length(); i++){
if (ch.fieldOfView[i]
if (ch.fieldOfView != null && ch.fieldOfView[i]
&& Dungeon.level.distance(i, ch.pos) <= warnDist
&& new Ballistica( ch.pos, i, Ballistica.STOP_TARGET | Ballistica.STOP_SOLID | Ballistica.IGNORE_SOFT_SOLID).collisionPos == i
&& new Ballistica( i, ch.pos, Ballistica.STOP_TARGET | Ballistica.STOP_SOLID | Ballistica.IGNORE_SOFT_SOLID).collisionPos == ch.pos){