v0.2.4b: crash fix and tweaks to bee AI
This commit is contained in:
parent
d68d70ca76
commit
5950244f9f
|
@ -133,8 +133,7 @@ public class Bee extends Mob {
|
||||||
protected boolean getCloser(int target) {
|
protected boolean getCloser(int target) {
|
||||||
if (enemy != null && Actor.findById(potHolder) == enemy) {
|
if (enemy != null && Actor.findById(potHolder) == enemy) {
|
||||||
target = enemy.pos;
|
target = enemy.pos;
|
||||||
return super.getCloser(target);
|
} else if (potPos != -1 && (state == WANDERING || Level.distance(target, potPos) > 3))
|
||||||
} else if (state == WANDERING || (potPos != -1 && Level.distance(target, potPos) > 3))
|
|
||||||
this.target = target = potPos;
|
this.target = target = potPos;
|
||||||
return super.getCloser( target );
|
return super.getCloser( target );
|
||||||
}
|
}
|
||||||
|
|
|
@ -284,12 +284,6 @@ public class Heap implements Bundlable {
|
||||||
//stop processing current explosion, it will be replaced by the new one.
|
//stop processing current explosion, it will be replaced by the new one.
|
||||||
return;
|
return;
|
||||||
|
|
||||||
} else if (item instanceof Honeypot.ShatteredPot){
|
|
||||||
|
|
||||||
//need to let the bee know the pot is being destroyed.
|
|
||||||
((Honeypot.ShatteredPot) item).goAway();
|
|
||||||
items.remove( item );
|
|
||||||
|
|
||||||
//unique and upgraded items can endure the blast
|
//unique and upgraded items can endure the blast
|
||||||
} else if (!(item.level > 0 || item.unique))
|
} else if (!(item.level > 0 || item.unique))
|
||||||
items.remove( item );
|
items.remove( item );
|
||||||
|
|
Loading…
Reference in New Issue
Block a user