summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-01-03 03:44:12 +0200
committerAndrei Karas <akaras@inbox.ru>2011-01-03 03:44:12 +0200
commitc595f66bc9031fd28e5146a7aaee686b4ecb9c67 (patch)
treecba70daa9c4f42299ec155d841e891f8e14dd127 /src
parentf29ee3f1f2b77534224078a80211cedbf82679e2 (diff)
downloadmanaverse-c595f66bc9031fd28e5146a7aaee686b4ecb9c67.tar.gz
manaverse-c595f66bc9031fd28e5146a7aaee686b4ecb9c67.tar.bz2
manaverse-c595f66bc9031fd28e5146a7aaee686b4ecb9c67.tar.xz
manaverse-c595f66bc9031fd28e5146a7aaee686b4ecb9c67.zip
Increase emotes count to 44 and fix new emotes.
Diffstat (limited to 'src')
-rw-r--r--src/emoteshortcut.h2
-rw-r--r--src/game.cpp55
-rw-r--r--src/gui/widgets/emoteshortcutcontainer.cpp2
-rw-r--r--src/keyboardconfig.cpp6
-rw-r--r--src/keyboardconfig.h2
5 files changed, 38 insertions, 29 deletions
diff --git a/src/emoteshortcut.h b/src/emoteshortcut.h
index 0e06bb633..af1c377e6 100644
--- a/src/emoteshortcut.h
+++ b/src/emoteshortcut.h
@@ -21,7 +21,7 @@
#ifndef EMOTESHORTCUT_H
#define EMOTESHORTCUT_H
-#define SHORTCUT_EMOTES 42
+#define SHORTCUT_EMOTES 44
/**
* The class which keeps track of the emote shortcuts.
diff --git a/src/game.cpp b/src/game.cpp
index c0abdf543..bf944a710 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -1146,47 +1146,50 @@ void Game::handleInput()
setValidSpeed();
player_node->cancelFollow();
}
- else if (keyboard.isKeyActive(keyboard.KEY_DIRECT_UP))
+ else if (!keyboard.isKeyActive(keyboard.KEY_EMOTE))
{
- if (player_node->getDirection() != Being::UP)
+ if (keyboard.isKeyActive(keyboard.KEY_DIRECT_UP))
{
- if (Client::limitPackets(PACKET_DIRECTION))
+ if (player_node->getDirection() != Being::UP)
{
- player_node->setDirection(Being::UP);
- Net::getPlayerHandler()->setDirection(Being::UP);
+ if (Client::limitPackets(PACKET_DIRECTION))
+ {
+ player_node->setDirection(Being::UP);
+ Net::getPlayerHandler()->setDirection(Being::UP);
+ }
}
}
- }
- else if (keyboard.isKeyActive(keyboard.KEY_DIRECT_DOWN))
- {
- if (player_node->getDirection() != Being::DOWN)
+ else if (keyboard.isKeyActive(keyboard.KEY_DIRECT_DOWN))
{
- if (Client::limitPackets(PACKET_DIRECTION))
+ if (player_node->getDirection() != Being::DOWN)
{
- player_node->setDirection(Being::DOWN);
- Net::getPlayerHandler()->setDirection(Being::DOWN);
+ if (Client::limitPackets(PACKET_DIRECTION))
+ {
+ player_node->setDirection(Being::DOWN);
+ Net::getPlayerHandler()->setDirection(Being::DOWN);
+ }
}
}
- }
- else if (keyboard.isKeyActive(keyboard.KEY_DIRECT_LEFT))
- {
- if (player_node->getDirection() != Being::LEFT)
+ else if (keyboard.isKeyActive(keyboard.KEY_DIRECT_LEFT))
{
- if (Client::limitPackets(PACKET_DIRECTION))
+ if (player_node->getDirection() != Being::LEFT)
{
- player_node->setDirection(Being::LEFT);
- Net::getPlayerHandler()->setDirection(Being::LEFT);
+ if (Client::limitPackets(PACKET_DIRECTION))
+ {
+ player_node->setDirection(Being::LEFT);
+ Net::getPlayerHandler()->setDirection(Being::LEFT);
+ }
}
}
- }
- else if (keyboard.isKeyActive(keyboard.KEY_DIRECT_RIGHT))
- {
- if (player_node->getDirection() != Being::RIGHT)
+ else if (keyboard.isKeyActive(keyboard.KEY_DIRECT_RIGHT))
{
- if (Client::limitPackets(PACKET_DIRECTION))
+ if (player_node->getDirection() != Being::RIGHT)
{
- player_node->setDirection(Being::RIGHT);
- Net::getPlayerHandler()->setDirection(Being::RIGHT);
+ if (Client::limitPackets(PACKET_DIRECTION))
+ {
+ player_node->setDirection(Being::RIGHT);
+ Net::getPlayerHandler()->setDirection(Being::RIGHT);
+ }
}
}
}
diff --git a/src/gui/widgets/emoteshortcutcontainer.cpp b/src/gui/widgets/emoteshortcutcontainer.cpp
index a9e435540..b90b2ca77 100644
--- a/src/gui/widgets/emoteshortcutcontainer.cpp
+++ b/src/gui/widgets/emoteshortcutcontainer.cpp
@@ -41,7 +41,7 @@
#include "utils/dtor.h"
-static const int MAX_ITEMS = 42;
+static const int MAX_ITEMS = 44;
EmoteShortcutContainer::EmoteShortcutContainer():
ShortcutContainer(),
diff --git a/src/keyboardconfig.cpp b/src/keyboardconfig.cpp
index fd3c3aa09..625e467fc 100644
--- a/src/keyboardconfig.cpp
+++ b/src/keyboardconfig.cpp
@@ -243,6 +243,10 @@ static KeyData const keyData[KeyboardConfig::KEY_TOTAL] = {
KeyboardConfig::GRP_EMOTION},
{"keyEmoteShortcut42", SDLK_c, strprintf(_("Emote Shortcut %d"), 42),
KeyboardConfig::GRP_EMOTION},
+ {"keyEmoteShortcut43", SDLK_v, strprintf(_("Emote Shortcut %d"), 43),
+ KeyboardConfig::GRP_EMOTION},
+ {"keyEmoteShortcut44", SDLK_b, strprintf(_("Emote Shortcut %d"), 44),
+ KeyboardConfig::GRP_EMOTION},
{"keyWearOutfit", SDLK_RCTRL, _("Wear Outfit"),
KeyboardConfig::GRP_DEFAULT},
{"keyCopyOutfit", SDLK_RALT, _("Copy Outfit"),
@@ -411,7 +415,7 @@ int KeyboardConfig::getKeyIndex(int keyValue, int grp) const
int KeyboardConfig::getKeyEmoteOffset(int keyValue) const
{
- for (int i = KEY_EMOTE_1; i <= KEY_EMOTE_42; i++)
+ for (int i = KEY_EMOTE_1; i <= KEY_EMOTE_44; i++)
{
if (keyValue == mKey[i].value)
return 1 + i - KEY_EMOTE_1;
diff --git a/src/keyboardconfig.h b/src/keyboardconfig.h
index dbc90d2c4..a493bcf16 100644
--- a/src/keyboardconfig.h
+++ b/src/keyboardconfig.h
@@ -265,6 +265,8 @@ class KeyboardConfig
KEY_EMOTE_40,
KEY_EMOTE_41,
KEY_EMOTE_42,
+ KEY_EMOTE_43,
+ KEY_EMOTE_44,
KEY_WEAR_OUTFIT,
KEY_COPY_OUTFIT,
KEY_COPY_EQUIPED_OUTFIT,