summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/net/ea/beingrecv.cpp15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/net/ea/beingrecv.cpp b/src/net/ea/beingrecv.cpp
index 9b12583a8..bc1229b5d 100644
--- a/src/net/ea/beingrecv.cpp
+++ b/src/net/ea/beingrecv.cpp
@@ -422,7 +422,7 @@ void BeingRecv::processBeingMove3(Net::MessageIn &msg)
const int len = msg.readInt16("len") - 14;
Being *const dstBeing = actorManager->findBeing(
msg.readBeingId("being id"));
- if (!dstBeing)
+ if (!dstBeing || dstBeing == localPlayer)
{
DEBUGLOGSTR("invisible player?");
msg.readInt16("speed");
@@ -436,14 +436,8 @@ void BeingRecv::processBeingMove3(Net::MessageIn &msg)
dstBeing->setWalkSpeed(speed);
const int16_t x = msg.readInt16("x");
const int16_t y = msg.readInt16("y");
-
- dstBeing->setAction(BeingAction::STAND, 0);
- dstBeing->setTileCoords(x, y);
-
- if (dstBeing == localPlayer)
- return;
-
const unsigned char *moves = msg.readBytes(len, "moving path");
+
Path path;
if (moves)
{
@@ -486,6 +480,11 @@ void BeingRecv::processBeingMove3(Net::MessageIn &msg)
delete [] moves;
}
+ if (path.empty())
+ return;
+
+ dstBeing->setAction(BeingAction::STAND, 0);
+ dstBeing->setTileCoords(x, y);
dstBeing->setPath(path);
BLOCK_END("BeingRecv::processBeingMove3")
}