diff options
author | Bertram <bertram@cegetel.net> | 2010-01-27 01:46:58 +0100 |
---|---|---|
committer | Bertram <bertram@cegetel.net> | 2010-01-27 01:46:58 +0100 |
commit | 572ed6a1aa6c847e8764bddf2bb0d687ecf1a405 (patch) | |
tree | f0183d944a3a887b359e2dc2895e87a9c2767e66 /src/gui/viewport.cpp | |
parent | 692aac3122843c59610684802e25b92cc9f0a33c (diff) | |
download | mana-client-572ed6a1aa6c847e8764bddf2bb0d687ecf1a405.tar.gz mana-client-572ed6a1aa6c847e8764bddf2bb0d687ecf1a405.tar.bz2 mana-client-572ed6a1aa6c847e8764bddf2bb0d687ecf1a405.tar.xz mana-client-572ed6a1aa6c847e8764bddf2bb0d687ecf1a405.zip |
Added mutators/accessors to being.h and smal cleanups.
Diffstat (limited to 'src/gui/viewport.cpp')
-rw-r--r-- | src/gui/viewport.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gui/viewport.cpp b/src/gui/viewport.cpp index e3d8b092..2ed7deb9 100644 --- a/src/gui/viewport.cpp +++ b/src/gui/viewport.cpp @@ -355,7 +355,7 @@ void Viewport::mousePressed(gcn::MouseEvent &event) case Being::MONSTER: case Being::PLAYER: // Ignore it if its dead - if (being->mAction == Being::DEAD) + if (!being->isAlive()) break; if (player_node->withinAttackRange(being) || @@ -378,7 +378,7 @@ void Viewport::mousePressed(gcn::MouseEvent &event) { player_node->pickUp(item); } - else if (player_node->mAction == Being::SIT) + else if (player_node->getCurrentAction() == Being::SIT) { return; } @@ -420,9 +420,9 @@ void Viewport::mouseDragged(gcn::MouseEvent &event) player_node->pathSetByMouse(); } #else - if (mLocalWalkTime != player_node->mWalkTime) + if (mLocalWalkTime != player_node->getWalkTime()) { - mLocalWalkTime = player_node->mWalkTime; + mLocalWalkTime = player_node->getWalkTime(); int destX = event.getX() / 32 + mTileViewX; int destY = event.getY() / 32 + mTileViewY; player_node->setDestination(destX, destY); |