diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-07-30 12:25:16 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-07-30 12:25:16 +0300 |
commit | 1680d159ecbf75591d2dab1416ff8144c27d4de5 (patch) | |
tree | cd34ad27487036265f08d7aa63476c160280d899 /src/eventsmanager.cpp | |
parent | 9913b4b481ddcaf0fa8499f3554c85bb588be7f0 (diff) | |
download | ManaVerse-1680d159ecbf75591d2dab1416ff8144c27d4de5.tar.gz ManaVerse-1680d159ecbf75591d2dab1416ff8144c27d4de5.tar.bz2 ManaVerse-1680d159ecbf75591d2dab1416ff8144c27d4de5.tar.xz ManaVerse-1680d159ecbf75591d2dab1416ff8144c27d4de5.zip |
Rename player_node variable into localPlayer.
Diffstat (limited to 'src/eventsmanager.cpp')
-rw-r--r-- | src/eventsmanager.cpp | 36 |
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; |