summaryrefslogtreecommitdiff
path: root/src/being/localplayer.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-05-30 16:42:51 +0300
committerAndrei Karas <akaras@inbox.ru>2015-05-30 16:42:51 +0300
commit2b46f2d6d7cd732f1f4f1d9e8a15a1428166a959 (patch)
treef32c0aea02ec7a0b818aede9a81238e0418b1f23 /src/being/localplayer.cpp
parent2b8e0b02338400b215b73cec900ffa1fddbac60a (diff)
downloadmv-2b46f2d6d7cd732f1f4f1d9e8a15a1428166a959.tar.gz
mv-2b46f2d6d7cd732f1f4f1d9e8a15a1428166a959.tar.bz2
mv-2b46f2d6d7cd732f1f4f1d9e8a15a1428166a959.tar.xz
mv-2b46f2d6d7cd732f1f4f1d9e8a15a1428166a959.zip
Move reachable enum into separate file.
Diffstat (limited to 'src/being/localplayer.cpp')
-rw-r--r--src/being/localplayer.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/being/localplayer.cpp b/src/being/localplayer.cpp
index 5c47c55a8..6c8bd5ea6 100644
--- a/src/being/localplayer.cpp
+++ b/src/being/localplayer.cpp
@@ -42,6 +42,7 @@
#include "enums/being/attributes.h"
#include "enums/being/beingdirection.h"
+#include "enums/being/reachable.h"
#include "enums/net/packettypes.h"
@@ -1375,14 +1376,14 @@ bool LocalPlayer::isReachable(Being *const being,
if (!being || !mMap)
return false;
- if (being->isReachable() == Being::REACH_NO)
+ if (being->isReachable() == Reachable::REACH_NO)
return false;
if (being->getTileX() == mX
&& being->getTileY() == mY)
{
being->setDistance(0);
- being->setIsReachable(Being::REACH_YES);
+ being->setIsReachable(Reachable::REACH_YES);
return true;
}
else if (being->getTileX() - 1 <= mX
@@ -1391,7 +1392,7 @@ bool LocalPlayer::isReachable(Being *const being,
&& being->getTileY() + 1 >= mY)
{
being->setDistance(1);
- being->setIsReachable(Being::REACH_YES);
+ being->setIsReachable(Reachable::REACH_YES);
return true;
}
@@ -1405,12 +1406,12 @@ bool LocalPlayer::isReachable(Being *const being,
being->setDistance(static_cast<int>(debugPath.size()));
if (!debugPath.empty())
{
- being->setIsReachable(Being::REACH_YES);
+ being->setIsReachable(Reachable::REACH_YES);
return true;
}
else
{
- being->setIsReachable(Being::REACH_NO);
+ being->setIsReachable(Reachable::REACH_NO);
return false;
}
}