From 454c82d75810e8871b600561e0178a60da104eae Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Wed, 20 Jul 2016 19:24:29 -0400 Subject: [PATCH] v0.4.1: fixed some visual bugs involving guards chains --- .../actors/mobs/Guard.java | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Guard.java b/src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Guard.java index 66c0c9fc2..9ea19b5a5 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Guard.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Guard.java @@ -108,14 +108,17 @@ public class Guard extends Mob { yell( Messages.get(this, "scorpion") ); sprite.parent.add(new Chains(pos, enemy.pos, new Callback() { public void call() { - Actor.addDelayed(new Pushing(enemy, enemy.pos, newPosFinal), -1); - enemy.pos = newPosFinal; - Dungeon.level.press(newPosFinal, enemy); - Cripple.prolong(enemy, Cripple.class, 4f); - if (enemy == Dungeon.hero) { - Dungeon.hero.interrupt(); - Dungeon.observe(); - } + Actor.addDelayed(new Pushing(enemy, enemy.pos, newPosFinal, new Callback(){ + public void call() { + enemy.pos = newPosFinal; + Dungeon.level.press(newPosFinal, enemy); + Cripple.prolong(enemy, Cripple.class, 4f); + if (enemy == Dungeon.hero) { + Dungeon.hero.interrupt(); + Dungeon.observe(); + } + } + }), -1); next(); } }));