diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2005-03-21 21:27:59 +0000 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2005-03-21 21:27:59 +0000 |
commit | 58ffdbff028f763451f471639c6aecc530ca4d94 (patch) | |
tree | d2a2a3de9eb52ea25e6b4f361dbe64eaba309666 /src/net | |
parent | f7e4e3acb009dc09dffc98ff7b59b0260e7ecc28 (diff) | |
download | mana-58ffdbff028f763451f471639c6aecc530ca4d94.tar.gz mana-58ffdbff028f763451f471639c6aecc530ca4d94.tar.bz2 mana-58ffdbff028f763451f471639c6aecc530ca4d94.tar.xz mana-58ffdbff028f763451f471639c6aecc530ca4d94.zip |
Some cleanups and button, radiobutton and checkbox now take into account
disabled status.
Diffstat (limited to 'src/net')
-rw-r--r-- | src/net/protocol.cpp | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/src/net/protocol.cpp b/src/net/protocol.cpp index b59a8c68..ab873576 100644 --- a/src/net/protocol.cpp +++ b/src/net/protocol.cpp @@ -23,6 +23,7 @@ #include "../main.h" #include "../being.h" +#include "../game.h" #include "protocol.h" #include "network.h" @@ -175,17 +176,20 @@ void map_start() while (in_size < 2) flush(); - if (RFIFOW(0) == 0x0073) { + if (RFIFOW(0) == SMSG_LOGIN_SUCCESS) { while (in_size < 11) flush(); - x = get_x(RFIFOP(6)); - y = get_y(RFIFOP(6)); - //direction = get_direction(RFIFOP(6)); - log("Protocol: Player position: (%d, %d), Direction: %d", - x, y, direction); + startX = get_x(RFIFOP(6)); + startY = get_y(RFIFOP(6)); + int direction = get_direction(RFIFOP(6)); + log("Protocol: Player start position: (%d, %d), Direction: %d", + startX, startY, direction); RFIFOSKIP(11); - } else if(0x0081) { + } else if (0x0081) { log("Warning: Map server D/C"); - } else error("Unknown packet: map_start"); + } else { + error("Unknown packet: map_start"); + } + // Send "map loaded" WFIFOW(0) = net_w_value(0x007d); WFIFOSET(2); |