summaryrefslogtreecommitdiff
path: root/src/net/ea/maphandler.cpp
diff options
context:
space:
mode:
authorChuck Miller <shadowmil@gmail.com>2009-07-27 19:32:32 -0400
committerChuck Miller <shadowmil@gmail.com>2009-07-27 19:33:40 -0400
commit5a27795be5450add2cf3da3c03b2fe8771325e3e (patch)
treedaedd1beba82a87966317b81c92f9662caae2dda /src/net/ea/maphandler.cpp
parent99648c2c8693de68ebe0449e139413864e5dd6f1 (diff)
downloadmana-5a27795be5450add2cf3da3c03b2fe8771325e3e.tar.gz
mana-5a27795be5450add2cf3da3c03b2fe8771325e3e.tar.bz2
mana-5a27795be5450add2cf3da3c03b2fe8771325e3e.tar.xz
mana-5a27795be5450add2cf3da3c03b2fe8771325e3e.zip
Makes mX and mY in the being class private
Diffstat (limited to 'src/net/ea/maphandler.cpp')
-rw-r--r--src/net/ea/maphandler.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/net/ea/maphandler.cpp b/src/net/ea/maphandler.cpp
index a466e022..3036612e 100644
--- a/src/net/ea/maphandler.cpp
+++ b/src/net/ea/maphandler.cpp
@@ -61,14 +61,17 @@ void MapHandler::handleMessage(MessageIn &msg)
switch (msg.getId())
{
case SMSG_MAP_LOGIN_SUCCESS:
+ {
+ Uint16 x, y;
msg.readInt32(); // server tick
- msg.readCoordinates(player_node->mX, player_node->mY, direction);
+ msg.readCoordinates(x, y, direction);
msg.skip(2); // unknown
logger->log("Protocol: Player start position: (%d, %d), Direction: %d",
- player_node->mX, player_node->mY, direction);
+ x, y, direction);
state = STATE_GAME;
+ player_node->setTileCoords(x, y);
game = new Game;
- break;
+ } break;
case SMSG_SERVER_PING:
// We ignore this for now