v2.3.0: fixed cases where pushing could fail to apply and freeze
This commit is contained in:
@@ -64,17 +64,19 @@ public class Pushing extends Actor {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected boolean act() {
|
protected boolean act() {
|
||||||
if (sprite != null) {
|
Actor.remove( Pushing.this );
|
||||||
|
|
||||||
|
if (sprite != null && sprite.parent != null) {
|
||||||
if (Dungeon.level.heroFOV[from] || Dungeon.level.heroFOV[to]){
|
if (Dungeon.level.heroFOV[from] || Dungeon.level.heroFOV[to]){
|
||||||
sprite.visible = true;
|
sprite.visible = true;
|
||||||
}
|
}
|
||||||
if (effect == null) {
|
if (effect == null) {
|
||||||
new Effect();
|
new Effect();
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
Actor.remove( Pushing.this );
|
|
||||||
|
|
||||||
//so that all pushing effects at the same time go simultaneously
|
//so that all pushing effects at the same time go simultaneously
|
||||||
for ( Actor actor : Actor.all() ){
|
for ( Actor actor : Actor.all() ){
|
||||||
if (actor instanceof Pushing && actor.cooldown() == 0)
|
if (actor instanceof Pushing && actor.cooldown() == 0)
|
||||||
|
|||||||
Reference in New Issue
Block a user