diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2005-03-11 00:57:27 +0000 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2005-03-11 00:57:27 +0000 |
commit | 7b41ec2aaf871b7a443c65259afc1fd625dd3b9f (patch) | |
tree | d7406e40bf4a8ad7941a3a4cb3901de50867fff0 | |
parent | 95683b8ecea0b12342b259e501e7eed8b5c40ee6 (diff) | |
download | Mana-7b41ec2aaf871b7a443c65259afc1fd625dd3b9f.tar.gz Mana-7b41ec2aaf871b7a443c65259afc1fd625dd3b9f.tar.bz2 Mana-7b41ec2aaf871b7a443c65259afc1fd625dd3b9f.tar.xz Mana-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.
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | src/being.cpp | 1 | ||||
-rw-r--r-- | src/being.h | 1 | ||||
-rw-r--r-- | src/game.cpp | 9 | ||||
-rw-r--r-- | src/main.cpp | 1 | ||||
-rw-r--r-- | src/main.h | 1 |
6 files changed, 17 insertions, 4 deletions
@@ -1,3 +1,11 @@ +0.0.11 (.... 2005) +- Added walking with mouse by clicking where you want to go +- More complete support for new map format (collision, compression) +- Fixed problem where players would often turn up with black hair +- Fixed not showing other players dead when they die +- Fixed a crash in being path handling +- Fixed initial starting position for new player characters + 0.0.10 (5 March 2005) - Added using and dropping of items - Added experimental support for OpenGL rendering diff --git a/src/being.cpp b/src/being.cpp index f49e7145..6ae01f77 100644 --- a/src/being.cpp +++ b/src/being.cpp @@ -23,6 +23,7 @@ #include "being.h" #include "game.h" +#include "net/protocol.h" Being *player_node = NULL; diff --git a/src/being.h b/src/being.h index 41a2cca5..657a0658 100644 --- a/src/being.h +++ b/src/being.h @@ -24,7 +24,6 @@ #ifndef _TMW_BEING_H #define _TMW_BEING_H -#include "net/protocol.h" #include <list> struct PATH_NODE { 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; } diff --git a/src/main.cpp b/src/main.cpp index aba7724c..69ffd431 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -29,6 +29,7 @@ #include "sound.h" #include "graphics.h" #include "resources/resourcemanager.h" +#include "net/protocol.h" #include <iostream> #include <guichan.hpp> @@ -29,7 +29,6 @@ #include "gui/skill.h" #include "graphic/spriteset.h" #include "resources/image.h" -#include "net/protocol.h" #include "configuration.h" #include "game.h" #include "log.h" |