v1.0.3: fixed rare vfx issues with guards and pushing effects
This commit is contained in:
parent
724ffbb85b
commit
8b1013fd7e
|
@ -116,6 +116,7 @@ public class Guard extends Mob {
|
|||
|
||||
private void pullEnemy( Char enemy, int pullPos ){
|
||||
enemy.pos = pullPos;
|
||||
enemy.sprite.place(pullPos);
|
||||
Dungeon.level.occupyCell(enemy);
|
||||
Cripple.prolong(enemy, Cripple.class, 4f);
|
||||
if (enemy == Dungeon.hero) {
|
||||
|
@ -173,7 +174,7 @@ public class Guard extends Mob {
|
|||
&& !isCharmedBy( enemy )
|
||||
&& !canAttack( enemy )
|
||||
&& Dungeon.level.distance( pos, enemy.pos ) < 5
|
||||
&& Random.Int(3) == 0
|
||||
|
||||
|
||||
&& chain(enemy.pos)){
|
||||
return !(sprite.visible || enemy.sprite.visible);
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
|
||||
package com.shatteredpixel.shatteredpixeldungeon.effects;
|
||||
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Actor;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite;
|
||||
|
@ -58,7 +59,9 @@ public class Pushing extends Actor {
|
|||
@Override
|
||||
protected boolean act() {
|
||||
if (sprite != null) {
|
||||
|
||||
if (Dungeon.level.heroFOV[from] || Dungeon.level.heroFOV[to]){
|
||||
sprite.visible = true;
|
||||
}
|
||||
if (effect == null) {
|
||||
new Effect();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user