diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-11-16 22:35:17 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-11-16 22:35:17 +0300 |
commit | b3d17866a3c5700b52c2b0b954fce132a52c1dbf (patch) | |
tree | 7ba07c98a1842eb766de35e172f559dcf5ac6fb4 /src/game.cpp | |
parent | 5e8e53f6e795a84ab5ca6cfe0d08672878044707 (diff) | |
download | mv-b3d17866a3c5700b52c2b0b954fce132a52c1dbf.tar.gz mv-b3d17866a3c5700b52c2b0b954fce132a52c1dbf.tar.bz2 mv-b3d17866a3c5700b52c2b0b954fce132a52c1dbf.tar.xz mv-b3d17866a3c5700b52c2b0b954fce132a52c1dbf.zip |
Convert State enum into strong typed.
Diffstat (limited to 'src/game.cpp')
-rw-r--r-- | src/game.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/game.cpp b/src/game.cpp index 776dd8621..df1527a14 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -437,7 +437,7 @@ Game::~Game() AnimatedSprite::setEnableCache(false); delete2(actorManager) - if (client->getState() != STATE_CHANGE_MAP) + if (client->getState() != State::CHANGE_MAP) delete2(localPlayer) if (effectManager) effectManager->clear(); @@ -647,10 +647,10 @@ void Game::slowLogic() // Handle network stuff if (!gameHandler->isConnected()) { - if (client->getState() == STATE_CHANGE_MAP) + if (client->getState() == State::CHANGE_MAP) return; // Not a problem here - if (client->getState() != STATE_ERROR) + if (client->getState() != State::ERROR) { if (!disconnectedDialog) { @@ -670,15 +670,12 @@ void Game::slowLogic() { const Map *const map = viewport->getMap(); if (map) - { - logger->log("state: %d", client->getState()); map->saveExtraLayer(); - } } DialogsManager::closeDialogs(); WindowManager::setFramerate(config.getIntValue("fpslimit")); mNextAdjustTime = cur_time + adjustDelay; - if (client->getState() != STATE_ERROR) + if (client->getState() != State::ERROR) errorMessage.clear(); } else |