summaryrefslogtreecommitdiff
path: root/src/gamemodifiers.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-07-30 12:25:16 +0300
committerAndrei Karas <akaras@inbox.ru>2014-07-30 12:25:16 +0300
commit1680d159ecbf75591d2dab1416ff8144c27d4de5 (patch)
treecd34ad27487036265f08d7aa63476c160280d899 /src/gamemodifiers.cpp
parent9913b4b481ddcaf0fa8499f3554c85bb588be7f0 (diff)
downloadmanaplus-1680d159ecbf75591d2dab1416ff8144c27d4de5.tar.gz
manaplus-1680d159ecbf75591d2dab1416ff8144c27d4de5.tar.bz2
manaplus-1680d159ecbf75591d2dab1416ff8144c27d4de5.tar.xz
manaplus-1680d159ecbf75591d2dab1416ff8144c27d4de5.zip
Rename player_node variable into localPlayer.
Diffstat (limited to 'src/gamemodifiers.cpp')
-rw-r--r--src/gamemodifiers.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/gamemodifiers.cpp b/src/gamemodifiers.cpp
index 228dd66f3..b96f9f4d6 100644
--- a/src/gamemodifiers.cpp
+++ b/src/gamemodifiers.cpp
@@ -153,7 +153,7 @@ addModifier(MoveType, moveType, 5,
void GameModifiers::changeMoveType(const bool forward)
{
- player_node->setMoveState(0);
+ localPlayer->setMoveState(0);
changeMode(&settings.moveType, mMoveTypeSize, "invertMoveDirection",
&GameModifiers::getMoveTypeString, 0, false, forward);
}
@@ -162,7 +162,7 @@ static const unsigned mCrazyMoveTypeSize = 11;
void GameModifiers::changeCrazyMoveType(const bool forward)
{
- player_node->setCrazyMoveState(0U);
+ localPlayer->setCrazyMoveState(0U);
changeMode(&settings.crazyMoveType, mCrazyMoveTypeSize, "crazyMoveType",
&GameModifiers::getCrazyMoveTypeString, 1, true, forward);
}
@@ -398,42 +398,42 @@ addModifier(AwayMode, awayMode, 2,
void GameModifiers::changeAwayMode()
{
- if (!player_node)
+ if (!localPlayer)
return;
settings.awayMode = !settings.awayMode;
- player_node->setAfkTime(0);
- player_node->setHalfAway(false);
- player_node->updateName();
+ localPlayer->setAfkTime(0);
+ localPlayer->setHalfAway(false);
+ localPlayer->updateName();
UpdateStatusListener::distributeEvent();
if (settings.awayMode)
{
if (chatWindow)
chatWindow->clearAwayLog();
- player_node->cancelFollow();
- player_node->navigateClean();
+ localPlayer->cancelFollow();
+ localPlayer->navigateClean();
if (outfitWindow)
outfitWindow->wearAwayOutfit();
// TRANSLATORS: away message box header
OkDialog *const dialog = new OkDialog(_("Away"),
config.getStringValue("afkMessage"),
DialogType::SILENCE, true, false);
- player_node->setAwayDialog(dialog);
- dialog->addActionListener(player_node->getAwayListener());
+ localPlayer->setAwayDialog(dialog);
+ dialog->addActionListener(localPlayer->getAwayListener());
soundManager.volumeOff();
- player_node->addAfkEffect();
+ localPlayer->addAfkEffect();
}
else
{
- player_node->setAwayDialog(nullptr);
+ localPlayer->setAwayDialog(nullptr);
soundManager.volumeRestore();
if (chatWindow)
{
chatWindow->displayAwayLog();
chatWindow->clearAwayLog();
}
- player_node->removeAfkEffect();
+ localPlayer->removeAfkEffect();
}
}