diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-06-22 20:58:13 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-06-22 20:58:13 +0300 |
commit | 8ad99cc3f4dd98f0b73a2ece9323f01099a81e80 (patch) | |
tree | 33115940e6efabec34efb71e0be6b6d7dfd7e4df /src/game.cpp | |
parent | 04f47f060f94ec0e2dfc3cccf62cff167e0ecd68 (diff) | |
download | manaverse-8ad99cc3f4dd98f0b73a2ece9323f01099a81e80.tar.gz manaverse-8ad99cc3f4dd98f0b73a2ece9323f01099a81e80.tar.bz2 manaverse-8ad99cc3f4dd98f0b73a2ece9323f01099a81e80.tar.xz manaverse-8ad99cc3f4dd98f0b73a2ece9323f01099a81e80.zip |
Add profiler lines into some functions.
Diffstat (limited to 'src/game.cpp')
-rw-r--r-- | src/game.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/game.cpp b/src/game.cpp index 63bafe187..2535f539d 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -794,8 +794,12 @@ void Game::resetAdjustLevel() void Game::handleMove() { + BLOCK_START("Game::handleMove") if (!player_node) + { + BLOCK_END("Game::handleMove") return; + } // Moving player around if (player_node->isAlive() @@ -806,7 +810,10 @@ void Game::handleMove() { NpcDialog *const dialog = NpcDialog::getActive(); if (dialog) + { + BLOCK_END("Game::handleMove") return; + } // Ignore input if either "ignore" key is pressed // Stops the character moving about if the user's window manager @@ -814,6 +821,7 @@ void Game::handleMove() if (inputManager.isActionActive(InputAction::IGNORE_INPUT_1) || inputManager.isActionActive(InputAction::IGNORE_INPUT_2)) { + BLOCK_END("Game::handleMove") return; } @@ -859,6 +867,7 @@ void Game::handleMove() if (!inputManager.isActionActive(InputAction::EMOTE) || direction == 0) moveInDirection(direction); } + BLOCK_END("Game::handleMove") } void Game::moveInDirection(const unsigned char direction) |