v1.1.0: fixed an exploit where quitting could cancel enemy attacks
This commit is contained in:
parent
050b37b346
commit
f8c76e52d9
|
@ -538,7 +538,6 @@ public abstract class Mob extends Char {
|
||||||
|
|
||||||
if (sprite != null && (sprite.visible || enemy.sprite.visible)) {
|
if (sprite != null && (sprite.visible || enemy.sprite.visible)) {
|
||||||
sprite.attack( enemy.pos );
|
sprite.attack( enemy.pos );
|
||||||
spend( attackDelay() );
|
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
@ -551,6 +550,7 @@ public abstract class Mob extends Char {
|
||||||
@Override
|
@Override
|
||||||
public void onAttackComplete() {
|
public void onAttackComplete() {
|
||||||
attack( enemy );
|
attack( enemy );
|
||||||
|
spend( attackDelay() );
|
||||||
super.onAttackComplete();
|
super.onAttackComplete();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user