summaryrefslogtreecommitdiff
path: root/src/game.cpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2005-03-11 00:57:27 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2005-03-11 00:57:27 +0000
commit7b41ec2aaf871b7a443c65259afc1fd625dd3b9f (patch)
treed7406e40bf4a8ad7941a3a4cb3901de50867fff0 /src/game.cpp
parent95683b8ecea0b12342b259e501e7eed8b5c40ee6 (diff)
downloadmana-client-7b41ec2aaf871b7a443c65259afc1fd625dd3b9f.tar.gz
mana-client-7b41ec2aaf871b7a443c65259afc1fd625dd3b9f.tar.bz2
mana-client-7b41ec2aaf871b7a443c65259afc1fd625dd3b9f.tar.xz
mana-client-7b41ec2aaf871b7a443c65259afc1fd625dd3b9f.zip
Maybe it would be a good idea to handle the login success message. This fixes
the initial starting location for new player characters.
Diffstat (limited to 'src/game.cpp')
-rw-r--r--src/game.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/game.cpp b/src/game.cpp
index 81c07375..2342168e 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -43,7 +43,6 @@
char map_path[480];
unsigned short dest_x, dest_y, src_x, src_y;
-unsigned int player_x, player_y;
bool refresh_beings = false;
unsigned char keyb_state;
volatile int tick_time;
@@ -493,6 +492,12 @@ void do_parse() {
#endif
// Parse packet based on their id
switch (id) {
+ case SMSG_LOGIN_SUCCESS:
+ // Connected to game server succesfully, set spawn point
+ player_node->x = get_x(RFIFOP(6));
+ player_node->y = get_y(RFIFOP(6));
+ break;
+
// Received speech
case 0x008d:
temp = (char *)malloc(RFIFOW(2)-7);
@@ -1293,7 +1298,7 @@ void do_parse() {
break;
// Manage non implemented packets
default:
- log("Unhandled packet: %x\n", id);
+ log("Unhandled packet: %x", id);
//alert(pkt_nfo,"","","","",0,0);
break;
}