summaryrefslogtreecommitdiff
path: root/src/game.cpp
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/game.cpp
parentf29ee3f1f2b77534224078a80211cedbf82679e2 (diff)
downloadmv-c595f66bc9031fd28e5146a7aaee686b4ecb9c67.tar.gz
mv-c595f66bc9031fd28e5146a7aaee686b4ecb9c67.tar.bz2
mv-c595f66bc9031fd28e5146a7aaee686b4ecb9c67.tar.xz
mv-c595f66bc9031fd28e5146a7aaee686b4ecb9c67.zip
Increase emotes count to 44 and fix new emotes.
Diffstat (limited to 'src/game.cpp')
-rw-r--r--src/game.cpp55
1 files changed, 29 insertions, 26 deletions
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);
+ }
}
}
}