From 421376d12d1847246b5840460ea1643c5e22e650 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 15 Apr 2012 20:48:30 +0300 Subject: Simplify emote shortcuts logic. --- src/actionmanager.cpp | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) (limited to 'src/actionmanager.cpp') 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) { -- cgit v1.2.3-60-g2f50