diff options
author | Eugenio Favalli <elvenprogrammer@gmail.com> | 2005-01-15 14:42:12 +0000 |
---|---|---|
committer | Eugenio Favalli <elvenprogrammer@gmail.com> | 2005-01-15 14:42:12 +0000 |
commit | ffadd9c8accbdc8f1fedf089c79bd6ec54b73884 (patch) | |
tree | b4d43393bc2679781deb8b3cf86bcc50a522e728 /src | |
parent | 9171b9739dfb8a1ca0bf963c5041d0a801e4aa90 (diff) | |
download | mana-client-ffadd9c8accbdc8f1fedf089c79bd6ec54b73884.tar.gz mana-client-ffadd9c8accbdc8f1fedf089c79bd6ec54b73884.tar.bz2 mana-client-ffadd9c8accbdc8f1fedf089c79bd6ec54b73884.tar.xz mana-client-ffadd9c8accbdc8f1fedf089c79bd6ec54b73884.zip |
Cleaning
Diffstat (limited to 'src')
-rw-r--r-- | src/being.cpp | 34 | ||||
-rw-r--r-- | src/being.h | 5 | ||||
-rw-r--r-- | src/game.cpp | 3 |
3 files changed, 8 insertions, 34 deletions
diff --git a/src/being.cpp b/src/being.cpp index 268f5e23..8091d7f8 100644 --- a/src/being.cpp +++ b/src/being.cpp @@ -30,7 +30,6 @@ Being *player_node = NULL; std::list<Being *> beings; - PATH_NODE::PATH_NODE(unsigned short x, unsigned short y): next(NULL) { @@ -45,21 +44,6 @@ PATH_NODE *calculate_path( return find_path(1, src_x, src_y, dest_x, dest_y); } -/*Being::Being(): - id(0), job(0), - action(0), frame(0), - path(NULL), - speech(NULL), speech_time(0), - tick_time(0), speed(150), - emotion(0), emotion_time(0), - text_x(0), text_y(0), - hair_style(1), hair_color(1), - weapon(0) -{ - memset(coordinates, 0, 3); - speech_color = makecol(0, 0, 0); -}*/ - void empty() { std::list<Being *>::iterator i; for (i = beings.begin(); i != beings.end(); i++) { @@ -68,8 +52,8 @@ void empty() { beings.clear(); } -void add_node(Being *Being) { - beings.push_back(Being); +void add_node(Being *being) { + beings.push_back(being); } void remove_node(unsigned int id) { @@ -123,7 +107,7 @@ Being *find_node(unsigned int id) { return NULL; } -class NODE_Compare { +class BeingCompare { public: bool operator() (const Being *a, const Being *b) const { return a->y < b->y; @@ -131,24 +115,22 @@ class NODE_Compare { }; void sort() { - beings.sort(NODE_Compare()); + beings.sort(BeingCompare()); } -void empty_path(Being *Being) { - if (Being) { - PATH_NODE *temp = Being->path; +void empty_path(Being *being) { + if (being) { + PATH_NODE *temp = being->path; PATH_NODE *next; while (temp) { next = temp->next; delete temp; temp = next; } - Being->path = NULL; + being->path = NULL; } } -// Beings restructuration - Being::Being() { id = 0; job = 0; action = 0; frame = 0; diff --git a/src/being.h b/src/being.h index ec58b986..368a60c6 100644 --- a/src/being.h +++ b/src/being.h @@ -27,11 +27,6 @@ #include "./net/protocol.h" #include <list> -#define ACTION_NODE 0 -//#define PLAYER_NODE 1 -//#define NPC_NODE 2 -//#define MONSTER_NODE 3 - struct PATH_NODE { /** * Constructor. diff --git a/src/game.cpp b/src/game.cpp index aa5f401a..59a18a39 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -174,10 +174,8 @@ void do_init() { empty(); player_node = new Being(); player_node->id = account_ID; - player_node->type = ACTION_NODE; player_node->x = x; player_node->y = y; - //set_coordinates(player_node->coordinates, x, y, 0); player_node->speed = 150; player_node->hair_color = char_info->hair_color; player_node->hair_style = char_info->hair_style; @@ -600,7 +598,6 @@ void do_parse() { player_node->job = 0; player_node->action = STAND; player_node->frame = 0; - player_node->type = ACTION_NODE; player_node->speed = 150; player_node->id = account_ID; player_node->x = RFIFOW(18); |