summaryrefslogtreecommitdiff
path: root/src/eventsmanager.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/eventsmanager.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/eventsmanager.cpp')
-rw-r--r--src/eventsmanager.cpp36
1 files changed, 18 insertions, 18 deletions
diff --git a/src/eventsmanager.cpp b/src/eventsmanager.cpp
index acb2ca512..b79c382b8 100644
--- a/src/eventsmanager.cpp
+++ b/src/eventsmanager.cpp
@@ -159,10 +159,10 @@ bool EventsManager::handleEvents() const
}
#ifdef USE_MUMBLE
- if (player_node && mumbleManager)
+ if (localPlayer && mumbleManager)
{
- mumbleManager->setPos(player_node->getTileX(),
- player_node->getTileY(), player_node->getDirection());
+ mumbleManager->setPos(localPlayer->getTileX(),
+ localPlayer->getTileY(), localPlayer->getDirection());
}
#endif
}
@@ -445,10 +445,10 @@ void EventsManager::handleSDL2WindowEvent(const SDL_Event &event)
WindowManager::setIsMinimized(true);
if (inGame)
{
- if (player_node && !settings.awayMode)
+ if (localPlayer && !settings.awayMode)
{
fpsLimit = config.getIntValue("altfpslimit");
- player_node->setHalfAway(true);
+ localPlayer->setHalfAway(true);
}
}
setPriority(false);
@@ -458,11 +458,11 @@ void EventsManager::handleSDL2WindowEvent(const SDL_Event &event)
WindowManager::setIsMinimized(false);
if (inGame)
{
- if (player_node)
+ if (localPlayer)
{
if (!settings.awayMode)
fpsLimit = config.getIntValue("fpslimit");
- player_node->setHalfAway(false);
+ localPlayer->setHalfAway(false);
}
}
setPriority(true);
@@ -478,10 +478,10 @@ void EventsManager::handleSDL2WindowEvent(const SDL_Event &event)
|| eventType == SDL_WINDOWEVENT_RESTORED
|| eventType == SDL_WINDOWEVENT_MAXIMIZED)
{
- if (player_node)
+ if (localPlayer)
{
- player_node->updateStatus();
- player_node->updateName();
+ localPlayer->updateStatus();
+ localPlayer->updateName();
}
Game::instance()->updateFrameRate(fpsLimit);
}
@@ -496,11 +496,11 @@ void EventsManager::handleActive(const SDL_Event &event)
if (event.active.gain)
{ // window restore
WindowManager::setIsMinimized(false);
- if (inGame && player_node)
+ if (inGame && localPlayer)
{
if (!settings.awayMode)
fpsLimit = config.getIntValue("fpslimit");
- player_node->setHalfAway(false);
+ localPlayer->setHalfAway(false);
}
setPriority(true);
}
@@ -510,19 +510,19 @@ void EventsManager::handleActive(const SDL_Event &event)
client->setState(STATE_EXIT);
#else
WindowManager::setIsMinimized(true);
- if (inGame && player_node && !settings.awayMode)
+ if (inGame && localPlayer && !settings.awayMode)
{
fpsLimit = config.getIntValue("altfpslimit");
- player_node->setHalfAway(true);
+ localPlayer->setHalfAway(true);
}
setPriority(false);
#endif
}
- if (inGame && player_node)
- player_node->updateStatus();
+ if (inGame && localPlayer)
+ localPlayer->updateStatus();
}
- if (inGame && player_node)
- player_node->updateName();
+ if (inGame && localPlayer)
+ localPlayer->updateName();
if (event.active.state & SDL_APPINPUTFOCUS)
settings.inputFocused = event.active.gain;