From b3d17866a3c5700b52c2b0b954fce132a52c1dbf Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 16 Nov 2015 22:35:17 +0300 Subject: Convert State enum into strong typed. --- src/game.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'src/game.cpp') 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 -- cgit v1.2.3-70-g09d2