From 572ed6a1aa6c847e8764bddf2bb0d687ecf1a405 Mon Sep 17 00:00:00 2001 From: Bertram Date: Wed, 27 Jan 2010 01:46:58 +0100 Subject: Added mutators/accessors to being.h and smal cleanups. --- src/gui/viewport.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/gui/viewport.cpp') 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); -- cgit v1.2.3-70-g09d2