diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-04-15 20:48:30 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-04-15 20:48:30 +0300 |
commit | 421376d12d1847246b5840460ea1643c5e22e650 (patch) | |
tree | ddb1b9a37a45206056a2e425cc5eabacc4ecce0a /src/actionmanager.cpp | |
parent | 0ae57c3a2e3b8b8ae6bc3745f6e2fca2483e6899 (diff) | |
download | manaverse-421376d12d1847246b5840460ea1643c5e22e650.tar.gz manaverse-421376d12d1847246b5840460ea1643c5e22e650.tar.bz2 manaverse-421376d12d1847246b5840460ea1643c5e22e650.tar.xz manaverse-421376d12d1847246b5840460ea1643c5e22e650.zip |
Simplify emote shortcuts logic.
Diffstat (limited to 'src/actionmanager.cpp')
-rw-r--r-- | src/actionmanager.cpp | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/src/actionmanager.cpp b/src/actionmanager.cpp index 2c9dd775f..91773983e 100644 --- a/src/actionmanager.cpp +++ b/src/actionmanager.cpp @@ -132,18 +132,14 @@ impHandler0(moveRight) impHandler(emote) { - if (inputManager.isActionActive(Input::KEY_EMOTE)) + int emotion = 1 + event.action - Input::KEY_EMOTE_1; + if (emotion > 0) { - // emote keys - int emotion = 1 + event.action - Input::KEY_EMOTE_1; - if (emotion > 0) - { - if (emoteShortcut) - emoteShortcut->useEmote(emotion); - if (Game::instance()) - Game::instance()->setValidSpeed(); - return true; - } + if (emoteShortcut) + emoteShortcut->useEmote(emotion); + if (Game::instance()) + Game::instance()->setValidSpeed(); + return true; } return false; @@ -151,7 +147,6 @@ impHandler(emote) impHandler(moveToPoint) { - // move to point keys int num = event.action - Input::KEY_MOVE_TO_POINT_1; if (socialWindow && num >= 0) { |