summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/being.cpp2
-rw-r--r--src/net/tmwa/beinghandler.cpp10
2 files changed, 6 insertions, 6 deletions
diff --git a/src/being.cpp b/src/being.cpp
index 36646006..3f375e03 100644
--- a/src/being.cpp
+++ b/src/being.cpp
@@ -203,7 +203,7 @@ void Being::setDestination(int dstX, int dstY)
if (!mMap->getWalk(dstX / tileWidth, dstY / tileHeight))
return;
- Position dest(dstX, dstY);
+ Position dest(0, 0);
Path thisPath;
if (Net::getPlayerHandler()->usePixelPrecision())
{
diff --git a/src/net/tmwa/beinghandler.cpp b/src/net/tmwa/beinghandler.cpp
index 5ae11423..d61559f8 100644
--- a/src/net/tmwa/beinghandler.cpp
+++ b/src/net/tmwa/beinghandler.cpp
@@ -101,8 +101,9 @@ Being *createBeing(int id, short job)
return being;
}
-void handleMoveMessage(Uint16 srcX, Uint16 srcY, Uint16 dstX, Uint16 dstY,
- Being *dstBeing, int tileWidth, int tileHeight)
+static void handleMoveMessage(Uint16 srcX, Uint16 srcY,
+ Uint16 dstX, Uint16 dstY,
+ Being *dstBeing, int tileWidth, int tileHeight)
{
// Avoid dealing with flawed destination
if (srcX && srcY && dstX && dstY)
@@ -120,13 +121,12 @@ void handleMoveMessage(Uint16 srcX, Uint16 srcY, Uint16 dstX, Uint16 dstY,
|| std::abs(dest.y - pos.y) > POS_DEST_DIFF_TOLERANCE)
dstBeing->setPosition(pos);
- // We turn the destination back to a pixel one.
dstBeing->setDestination(dest.x, dest.y);
}
}
-void handlePosMessage(Uint16 x, Uint16 y, Being *dstBeing,
- int tileWidth, int tileHeight, Uint8 dir = 0)
+static void handlePosMessage(Uint16 x, Uint16 y, Being *dstBeing,
+ int tileWidth, int tileHeight, Uint8 dir = 0)
{
// Avoid dealing with flawed destination
if (x && y)