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
|
||||
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]){
|
||||
sprite.visible = true;
|
||||
}
|
||||
if (effect == null) {
|
||||
new Effect();
|
||||
}
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
|
||||
Actor.remove( Pushing.this );
|
||||
|
||||
//so that all pushing effects at the same time go simultaneously
|
||||
for ( Actor actor : Actor.all() ){
|
||||
if (actor instanceof Pushing && actor.cooldown() == 0)
|
||||
|
||||
Reference in New Issue
Block a user