summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-10-30 20:55:07 +0300
committerAndrei Karas <akaras@inbox.ru>2011-10-30 20:55:07 +0300
commitb2a0d0719989384171061edff8d720a9ab33467f (patch)
treea6c87e6e5f3ea28eeaa174634d631428e089c812 /src
parent2c3c118c03ece5cad2b73affffbcbbc5a5746c7a (diff)
downloadmv-b2a0d0719989384171061edff8d720a9ab33467f.tar.gz
mv-b2a0d0719989384171061edff8d720a9ab33467f.tar.bz2
mv-b2a0d0719989384171061edff8d720a9ab33467f.tar.xz
mv-b2a0d0719989384171061edff8d720a9ab33467f.zip
Remove duplicate getAway function.
Diffstat (limited to 'src')
-rw-r--r--src/game.cpp16
-rw-r--r--src/gui/chatwindow.cpp2
-rw-r--r--src/gui/statuspopup.cpp2
-rw-r--r--src/gui/statuswindow.cpp2
-rw-r--r--src/localplayer.cpp2
-rw-r--r--src/localplayer.h3
6 files changed, 12 insertions, 15 deletions
diff --git a/src/game.cpp b/src/game.cpp
index 6ed2c2239..31d41df78 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -785,7 +785,7 @@ void Game::handleInput()
if (keyboard.isEnabled()
&& !chatWindow->isInputFocused()
&& !setupWindow->isVisible()
- && !player_node->getAwayMode()
+ && !player_node->getAway()
&& !NpcDialog::isAnyInputFocused()
&& !InventoryWindow::isAnyInputFocused())
{
@@ -833,7 +833,7 @@ void Game::handleInput()
if ((!chatWindow || !chatWindow->isInputFocused())
&& !gui->getFocusHandler()->getModalFocused()
- && !player_node->getAwayMode())
+ && !player_node->getAway())
{
NpcDialog *dialog = NpcDialog::getActive();
if (keyboard.isKeyActive(keyboard.KEY_OK)
@@ -957,7 +957,7 @@ void Game::handleInput()
&& !gui->getFocusHandler()->getModalFocused()
&& mValidSpeed
&& (!setupWindow || !setupWindow->isVisible())
- && (!player_node || !player_node->getAwayMode())
+ && (!player_node || !player_node->getAway())
&& !NpcDialog::isAnyInputFocused()
&& !InventoryWindow::isAnyInputFocused())
{
@@ -1147,7 +1147,7 @@ void Game::handleInput()
if (keyboard.isEnabled()
&& (!chatWindow || !chatWindow->isInputFocused())
&& !NpcDialog::isAnyInputFocused()
- && (!player_node || !player_node->getAwayMode())
+ && (!player_node || !player_node->getAway())
&& !keyboard.isKeyActive(keyboard.KEY_TARGET)
&& !keyboard.isKeyActive(keyboard.KEY_UNTARGET)
&& !InventoryWindow::isAnyInputFocused())
@@ -1367,7 +1367,7 @@ void Game::handleInput()
if (event.active.gain)
{ // window restore
Client::setIsMinimized(false);
- if (!player_node && !player_node->getAwayMode())
+ if (!player_node && !player_node->getAway())
fpsLimit = config.getIntValue("fpslimit");
if (player_node)
player_node->setHalfAway(false);
@@ -1375,7 +1375,7 @@ void Game::handleInput()
else
{ // window minimisation
Client::setIsMinimized(true);
- if (player_node && !player_node->getAwayMode())
+ if (player_node && !player_node->getAway())
{
fpsLimit = config.getIntValue("altfpslimit");
player_node->setHalfAway(true);
@@ -1391,7 +1391,7 @@ void Game::handleInput()
if (event.active.state & SDL_APPMOUSEFOCUS)
Client::setMouseFocused(event.active.gain);
- if (player_node && player_node->getAwayMode())
+ if (player_node && player_node->getAway())
{
if (Client::getInputFocused() || Client::getMouseFocused())
fpsLimit = config.getIntValue("fpslimit");
@@ -1429,7 +1429,7 @@ void Game::handleInput()
} // End while
// If the user is configuring the keys then don't respond.
- if (!player_node || !keyboard.isEnabled() || player_node->getAwayMode())
+ if (!player_node || !keyboard.isEnabled() || player_node->getAway())
return;
if (keyboard.isKeyActive(keyboard.KEY_WEAR_OUTFIT)
diff --git a/src/gui/chatwindow.cpp b/src/gui/chatwindow.cpp
index 7969f55f8..95f89bcad 100644
--- a/src/gui/chatwindow.cpp
+++ b/src/gui/chatwindow.cpp
@@ -1499,7 +1499,7 @@ void ChatWindow::loadCustomList()
void ChatWindow::addToAwayLog(std::string line)
{
- if (!player_node || !player_node->getAwayMode())
+ if (!player_node || !player_node->getAway())
return;
if (mAwayLog.size() > 20)
diff --git a/src/gui/statuspopup.cpp b/src/gui/statuspopup.cpp
index a0c8e06d4..9807fac47 100644
--- a/src/gui/statuspopup.cpp
+++ b/src/gui/statuspopup.cpp
@@ -493,7 +493,7 @@ void StatusPopup::updateLabels()
}
mImitationMode->adjustSize();
- switch ((int)player_node->getAwayMode())
+ switch ((int)player_node->getAway())
{
case 0:
setLabelText(mAwayMode, _("(O) on keyboard"), keyboard.KEY_AWAY);
diff --git a/src/gui/statuswindow.cpp b/src/gui/statuswindow.cpp
index c746eb82d..92e69b394 100644
--- a/src/gui/statuswindow.cpp
+++ b/src/gui/statuswindow.cpp
@@ -873,7 +873,7 @@ void StatusWindow::updateStatusBar(ProgressBar *bar, bool percent A_UNUSED)
break;
}
- switch ((int)player_node->getAwayMode())
+ switch ((int)player_node->getAway())
{
case 0:
str += translateLetter(N_("(O)"));
diff --git a/src/localplayer.cpp b/src/localplayer.cpp
index 58edbfd78..7fc1d8c7d 100644
--- a/src/localplayer.cpp
+++ b/src/localplayer.cpp
@@ -3930,7 +3930,7 @@ void LocalPlayer::stopAdvert()
void AwayListener::action(const gcn::ActionEvent &event)
{
- if (event.getId() == "ok" && player_node && player_node->getAwayMode())
+ if (event.getId() == "ok" && player_node && player_node->getAway())
{
player_node->changeAwayMode();
if (outfitWindow)
diff --git a/src/localplayer.h b/src/localplayer.h
index 414933e70..a35c42de7 100644
--- a/src/localplayer.h
+++ b/src/localplayer.h
@@ -325,9 +325,6 @@ class LocalPlayer : public Being, public ActorSpriteListener,
void changeAwayMode();
- bool getAwayMode()
- { return mAwayMode; }
-
void setAway(const std::string &message);
bool getAway()