summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-02-08 20:48:25 +0300
committerAndrei Karas <akaras@inbox.ru>2016-02-08 20:48:25 +0300
commitbb3a85b045a6135f7228023a7ba55fb1c9e6bd90 (patch)
tree375f1dc54fe02e077178af2a39d68616339d0c07
parent66c3c6d23bb3286eb49cc6f132813f64f065cbfa (diff)
downloadplus-bb3a85b045a6135f7228023a7ba55fb1c9e6bd90.tar.gz
plus-bb3a85b045a6135f7228023a7ba55fb1c9e6bd90.tar.bz2
plus-bb3a85b045a6135f7228023a7ba55fb1c9e6bd90.tar.xz
plus-bb3a85b045a6135f7228023a7ba55fb1c9e6bd90.zip
Allow attack also if casting animation active.
This need because casting animation not always can be stopped by request from server. Some times server not send stop packet by some reason.
-rw-r--r--src/being/localplayer.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/being/localplayer.cpp b/src/being/localplayer.cpp
index f59af9c10..ef034fc22 100644
--- a/src/being/localplayer.cpp
+++ b/src/being/localplayer.cpp
@@ -763,9 +763,13 @@ void LocalPlayer::attack(Being *const target, const bool keep,
const int dist_x = target->getTileX() - mX;
const int dist_y = target->getTileY() - mY;
- // Must be standing or sitting to attack
- if (mAction != BeingAction::STAND && mAction != BeingAction::SIT)
+ // Must be standing or sitting or casting to attack
+ if (mAction != BeingAction::STAND &&
+ mAction != BeingAction::SIT &&
+ mAction != BeingAction::CAST)
+ {
return;
+ }
if (!serverFeatures->haveAttackDirections())
{