summaryrefslogtreecommitdiff
path: root/src/localplayer.cpp
diff options
context:
space:
mode:
authorGuillaume Melquiond <guillaume.melquiond@gmail.com>2006-08-27 08:58:42 +0000
committerGuillaume Melquiond <guillaume.melquiond@gmail.com>2006-08-27 08:58:42 +0000
commit5980dba7ace73e6587b9966bc2076ad2b2eaa5f0 (patch)
tree10ccabf85e599f47e31849c6e7d5ca50015e441e /src/localplayer.cpp
parent40339bebb026cd553aacbbff6f2fe1aa14816d5a (diff)
downloadmana-5980dba7ace73e6587b9966bc2076ad2b2eaa5f0.tar.gz
mana-5980dba7ace73e6587b9966bc2076ad2b2eaa5f0.tar.bz2
mana-5980dba7ace73e6587b9966bc2076ad2b2eaa5f0.tar.xz
mana-5980dba7ace73e6587b9966bc2076ad2b2eaa5f0.zip
Send movements.
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;