v1.0.1: various safety checks and tweaks to prevent rare crashes
This commit is contained in:
parent
ea16725742
commit
08e860e7bd
|
@ -136,9 +136,9 @@ public class SpellSprite extends Image {
|
||||||
}
|
}
|
||||||
|
|
||||||
SpellSprite sprite = GameScene.spellSprite();
|
SpellSprite sprite = GameScene.spellSprite();
|
||||||
sprite.revive();
|
|
||||||
sprite.reset( index );
|
|
||||||
sprite.target = ch;
|
sprite.target = ch;
|
||||||
|
sprite.reset( index );
|
||||||
|
sprite.revive();
|
||||||
all.put( ch, sprite );
|
all.put( ch, sprite );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -578,6 +578,12 @@ public class PrisonBossLevel extends Level {
|
||||||
int tries = 0;
|
int tries = 0;
|
||||||
do {
|
do {
|
||||||
tries++;
|
tries++;
|
||||||
|
|
||||||
|
if (tries >= 100){
|
||||||
|
tries = 0;
|
||||||
|
fill -= 0.01f;
|
||||||
|
}
|
||||||
|
|
||||||
trapsPatch = Patch.generate(7, 7, fill, 0, false);
|
trapsPatch = Patch.generate(7, 7, fill, 0, false);
|
||||||
|
|
||||||
PathFinder.buildDistanceMap(tenguPos, BArray.not(trapsPatch, null));
|
PathFinder.buildDistanceMap(tenguPos, BArray.not(trapsPatch, null));
|
||||||
|
|
|
@ -115,9 +115,11 @@ public class Sungrass extends Plant {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void boost( int amount ){
|
public void boost( int amount ){
|
||||||
|
if (target != null) {
|
||||||
level += amount;
|
level += amount;
|
||||||
pos = target.pos;
|
pos = target.pos;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int icon() {
|
public int icon() {
|
||||||
|
|
|
@ -236,8 +236,10 @@ public class QuickSlotButton extends Button {
|
||||||
targeting = true;
|
targeting = true;
|
||||||
CharSprite sprite = lastTarget.sprite;
|
CharSprite sprite = lastTarget.sprite;
|
||||||
|
|
||||||
|
if (sprite.parent != null) {
|
||||||
sprite.parent.addToFront(crossM);
|
sprite.parent.addToFront(crossM);
|
||||||
crossM.point(sprite.center(crossM));
|
crossM.point(sprite.center(crossM));
|
||||||
|
}
|
||||||
|
|
||||||
crossB.point(slot.sprite.center(crossB));
|
crossB.point(slot.sprite.center(crossB));
|
||||||
crossB.visible = true;
|
crossB.visible = true;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user