summaryrefslogtreecommitdiff
path: root/src/gui/viewport.cpp
diff options
context:
space:
mode:
authorBertram <bertram@cegetel.net>2010-01-27 01:46:58 +0100
committerBertram <bertram@cegetel.net>2010-01-27 01:46:58 +0100
commit572ed6a1aa6c847e8764bddf2bb0d687ecf1a405 (patch)
treef0183d944a3a887b359e2dc2895e87a9c2767e66 /src/gui/viewport.cpp
parent692aac3122843c59610684802e25b92cc9f0a33c (diff)
downloadmana-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.cpp8
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);