summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
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();