summaryrefslogtreecommitdiff
path: root/src/being/being.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-07-04 20:04:05 +0300
committerAndrei Karas <akaras@inbox.ru>2016-07-04 20:04:05 +0300
commitc14af75fab3ddb45886a358e5056c2b0baee91e1 (patch)
tree8bc0979e70665db89c49b29d938ad7de376f4115 /src/being/being.cpp
parente0514307bfa5d7affb3dba5c8b61bf59b8bc3b81 (diff)
downloadplus-c14af75fab3ddb45886a358e5056c2b0baee91e1.tar.gz
plus-c14af75fab3ddb45886a358e5056c2b0baee91e1.tar.bz2
plus-c14af75fab3ddb45886a358e5056c2b0baee91e1.tar.xz
plus-c14af75fab3ddb45886a358e5056c2b0baee91e1.zip
Use skill type as bit mask with skill types.
It rare but still possible.
Diffstat (limited to 'src/being/being.cpp')
-rw-r--r--src/being/being.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/being/being.cpp b/src/being/being.cpp
index 4c750f5c8..cfb182355 100644
--- a/src/being/being.cpp
+++ b/src/being/being.cpp
@@ -1026,10 +1026,15 @@ void Being::handleSkill(Being *restrict const victim,
if (this != localPlayer && skill)
{
const SkillType::SkillType type = skill->type;
- if (type == SkillType::Attack || type == SkillType::Ground)
+ if ((type & SkillType::Attack) != 0 ||
+ (type & SkillType::Ground) != 0)
+ {
setAction(BeingAction::ATTACK, 1);
+ }
else
+ {
setAction(BeingAction::STAND, 1);
+ }
}
reset();