summaryrefslogtreecommitdiff
path: root/src/game.cpp
diff options
context:
space:
mode:
authorEugenio Favalli <elvenprogrammer@gmail.com>2005-01-15 15:52:54 +0000
committerEugenio Favalli <elvenprogrammer@gmail.com>2005-01-15 15:52:54 +0000
commitc92d7c1188febd7c5af15fa710ab06c3af4dede5 (patch)
treef6a78141dd8b68098aaff444845068eef9caf155 /src/game.cpp
parentffadd9c8accbdc8f1fedf089c79bd6ec54b73884 (diff)
downloadmana-c92d7c1188febd7c5af15fa710ab06c3af4dede5.tar.gz
mana-c92d7c1188febd7c5af15fa710ab06c3af4dede5.tar.bz2
mana-c92d7c1188febd7c5af15fa710ab06c3af4dede5.tar.xz
mana-c92d7c1188febd7c5af15fa710ab06c3af4dede5.zip
Fixed and improved death
Diffstat (limited to 'src/game.cpp')
-rw-r--r--src/game.cpp19
1 files changed, 14 insertions, 5 deletions
diff --git a/src/game.cpp b/src/game.cpp
index 59a18a39..a4cde620 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -192,7 +192,7 @@ void do_exit() {
}
void do_input() {
- if (walk_status == 0) {
+ if (walk_status == 0 && player_node->action != DEAD) {
int x = player_node->x;
int y = player_node->y;
@@ -477,7 +477,8 @@ void do_parse() {
being->frame = 0;
being->tick_time = tick_time;
}
- else remove_node(RFIFOL(2));
+ //else being->action = DEAD;
+ //remove_node(RFIFOL(2));
}
else remove_node(RFIFOL(2));
}
@@ -593,16 +594,22 @@ void do_parse() {
memset(map_path, '\0', 480);
append_filename(map_path, "./data/map/", RFIFOP(2), 480);
if (load_map(map_path)) {
+ Being *temp;
+ temp = new Being();
+ memcpy(temp, player_node, sizeof(Being));
empty();
- player_node = new Being();
+ /*player_node = new Being();
player_node->job = 0;
player_node->action = STAND;
player_node->frame = 0;
player_node->speed = 150;
- player_node->id = account_ID;
+ player_node->id = account_ID;*/
+ add_node(temp);
+ player_node = temp;
+ player_node->action = STAND;
+ player_node->frame = 0;
player_node->x = RFIFOW(18);
player_node->y = RFIFOW(20);
- add_node(player_node);
walk_status = 0;
// Send "map loaded"
WFIFOW(0) = net_w_value(0x007d);
@@ -671,6 +678,8 @@ void do_parse() {
deathNotice = new OkDialog("Message",
"You're now dead, press ok to restart",
&deathNoticeListener);
+ //remove_node(char_info->id);
+ being->action = DEAD;
}
break;
// Stop walking