summaryrefslogtreecommitdiff
path: root/src/localplayer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/localplayer.cpp')
-rw-r--r--src/localplayer.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/localplayer.cpp b/src/localplayer.cpp
index f157f04c..55f536db 100644
--- a/src/localplayer.cpp
+++ b/src/localplayer.cpp
@@ -32,6 +32,7 @@
#include "sound.h"
#include "net/messageout.h"
+#include "net/network.h"
#include "net/protocol.h"
LocalPlayer *player_node = NULL;
@@ -214,10 +215,10 @@ void LocalPlayer::walk(unsigned char dir)
void LocalPlayer::setDestination(Uint16 x, Uint16 y)
{
- char temp[3];
- MessageOut outMsg(0x0085);
- set_coordinates(temp, x, y, mDirection);
- outMsg.writeString(temp, 3);
+ MessageOut msg(PGMSG_WALK);
+ msg.writeShort(x * 32 + 16);
+ msg.writeShort(y * 32 + 16);
+ Network::send(Network::GAME, msg);
mPickUpTarget = NULL;