summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorStefan Beller <stefanbeller@googlemail.com>2012-08-05 21:06:47 +0200
committerStefan Beller <stefanbeller@googlemail.com>2012-08-05 21:06:47 +0200
commit1bbf0a238b62f2c977800f539386df5af9424fff (patch)
treee414fc330723543e93fa68301a6f024a22068aca /src
parenta234251387654472749f1d9031b1b759fdeea4b3 (diff)
parent1a3839c8edf0a49adbd34299eb2eab585f093f7f (diff)
downloadmanaserv-1bbf0a238b62f2c977800f539386df5af9424fff.tar.gz
manaserv-1bbf0a238b62f2c977800f539386df5af9424fff.tar.bz2
manaserv-1bbf0a238b62f2c977800f539386df5af9424fff.tar.xz
manaserv-1bbf0a238b62f2c977800f539386df5af9424fff.zip
Merge remote-tracking branch 'mainline/master' into lpc2012
Diffstat (limited to 'src')
-rw-r--r--src/game-server/being.cpp8
-rw-r--r--src/game-server/gamehandler.cpp10
2 files changed, 14 insertions, 4 deletions
diff --git a/src/game-server/being.cpp b/src/game-server/being.cpp
index 23d31d4c..ba45c0fd 100644
--- a/src/game-server/being.cpp
+++ b/src/game-server/being.cpp
@@ -355,15 +355,15 @@ void Being::move()
|| !getModifiedAttribute(ATTR_MOVE_SPEED_RAW))
return;
- // Ignore not moving beings
- if (mAction == STAND && mDst == getPosition())
- return;
-
// Remember the current position before moving. This is used by
// MapComposite::update() to determine whether a being has moved from one
// zone to another.
mOld = getPosition();
+ // Ignore not moving beings
+ if (mAction == STAND && mDst == getPosition())
+ return;
+
if (mMoveTime > WORLD_TICK_MS)
{
// Current move has not yet ended
diff --git a/src/game-server/gamehandler.cpp b/src/game-server/gamehandler.cpp
index 28f3bae8..8dde8d9a 100644
--- a/src/game-server/gamehandler.cpp
+++ b/src/game-server/gamehandler.cpp
@@ -519,7 +519,11 @@ void GameHandler::handlePickup(GameClient &client, MessageIn &message)
void GameHandler::handleUseItem(GameClient &client, MessageIn &message)
{
+ if (client.character->getAction() == DEAD)
+ return;
+
const int slot = message.readInt16();
+
Inventory inv(client.character);
if (ItemClass *ic = itemManager->getItem(inv.getItem(slot)))
@@ -642,6 +646,9 @@ void GameHandler::handleAttack(GameClient &client, MessageIn &message)
void GameHandler::handleUseSpecialOnBeing(GameClient &client, MessageIn &message)
{
+ if (client.character->getAction() == DEAD)
+ return;
+
const int specialID = message.readInt8();
const int targetID = message.readInt16(); // 0 when no target is selected
Being *being = 0;
@@ -654,6 +661,9 @@ void GameHandler::handleUseSpecialOnBeing(GameClient &client, MessageIn &message
void GameHandler::handleUseSpecialOnPoint(GameClient &client, MessageIn &message)
{
+ if (client.character->getAction() == DEAD)
+ return;
+
const int specialID = message.readInt8();
const int x = message.readInt16();
const int y = message.readInt16();