diff options
author | Chuck Miller <shadowmil@gmail.com> | 2009-07-27 19:32:32 -0400 |
---|---|---|
committer | Chuck Miller <shadowmil@gmail.com> | 2009-07-27 19:33:40 -0400 |
commit | 5a27795be5450add2cf3da3c03b2fe8771325e3e (patch) | |
tree | daedd1beba82a87966317b81c92f9662caae2dda /src/beingmanager.cpp | |
parent | 99648c2c8693de68ebe0449e139413864e5dd6f1 (diff) | |
download | mana-client-5a27795be5450add2cf3da3c03b2fe8771325e3e.tar.gz mana-client-5a27795be5450add2cf3da3c03b2fe8771325e3e.tar.bz2 mana-client-5a27795be5450add2cf3da3c03b2fe8771325e3e.tar.xz mana-client-5a27795be5450add2cf3da3c03b2fe8771325e3e.zip |
Makes mX and mY in the being class private
Diffstat (limited to 'src/beingmanager.cpp')
-rw-r--r-- | src/beingmanager.cpp | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/src/beingmanager.cpp b/src/beingmanager.cpp index 284f1343..0b8f71b5 100644 --- a/src/beingmanager.cpp +++ b/src/beingmanager.cpp @@ -40,14 +40,9 @@ class FindBeingFunctor bool operator() (Being *being) { Uint16 other_y = y + ((being->getType() == Being::NPC) ? 1 : 0); -#ifdef TMWSERV_SUPPORT const Vector &pos = being->getPosition(); return ((int) pos.x / 32 == x && ((int) pos.y / 32 == y || (int) pos.y / 32 == other_y) && -#else - return (being->mX == x && - (being->mY == y || being->mY == other_y) && -#endif being->mAction != Being::DEAD && (type == Being::UNKNOWN || being->getType() == type)); } @@ -242,7 +237,7 @@ Being *BeingManager::findNearestLivingBeing(int x, int y, int maxdist, const Vector &pos = being->getPosition(); int d = abs(((int) pos.x) - x) + abs(((int) pos.y) - y); #else - int d = abs(being->mX - x) + abs(being->mY - y); + int d = abs(being->getTileX() - x) + abs(being->getTileY() - y); #endif if ((being->getType() == type || type == Being::UNKNOWN) @@ -268,8 +263,8 @@ Being *BeingManager::findNearestLivingBeing(Being *aroundBeing, int maxdist, int y = apos.y; maxdist = maxdist * 32; #else - int x = aroundBeing->mX; - int y = aroundBeing->mY; + int x = aroundBeing->getTileX(); + int y = aroundBeing->getTileY(); #endif for (Beings::const_iterator i = mBeings.begin(), i_end = mBeings.end(); @@ -280,7 +275,7 @@ Being *BeingManager::findNearestLivingBeing(Being *aroundBeing, int maxdist, const Vector &pos = being->getPosition(); int d = abs(((int) pos.x) - x) + abs(((int) pos.y) - y); #else - int d = abs(being->mX - x) + abs(being->mY - y); + int d = abs(being->getTileX() - x) + abs(being->getTileY() - y); #endif if ((being->getType() == type || type == Being::UNKNOWN) |