diff options
author | shennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2012-07-01 15:54:24 +0000 |
---|---|---|
committer | shennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2012-07-01 15:54:24 +0000 |
commit | 738829e75dbc881663f9953c512efca50f2242c1 (patch) | |
tree | ce364a2b0ee8aeabd339d74dcab3cfa929f5fa12 /src/map/clif.c | |
parent | a22d29d0cb2f6cc74840caa61b812feca5eee590 (diff) | |
download | hercules-738829e75dbc881663f9953c512efca50f2242c1.tar.gz hercules-738829e75dbc881663f9953c512efca50f2242c1.tar.bz2 hercules-738829e75dbc881663f9953c512efca50f2242c1.tar.xz hercules-738829e75dbc881663f9953c512efca50f2242c1.zip |
Fixed bugreport:6045 characters will no longer be left "broken" when with 0 hp (usually caused by a crash), instead they'll login dead with the window to go back to respawn point or remain there :p.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16363 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/clif.c')
-rw-r--r-- | src/map/clif.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/map/clif.c b/src/map/clif.c index 3ce7ecf5f..132df9233 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -9319,6 +9319,10 @@ void clif_parse_LoadEndAck(int fd,struct map_session_data *sd) else sd->areanpc_id = 0; + /* it broke at some point (e.g. during a crash), so we make it visibly dead again. */ + if( !sd->status.hp && !pc_isdead(sd) && status_isdead(&sd->bl) ) + pc_setdead(sd); + // If player is dead, and is spawned (such as @refresh) send death packet. [Valaris] if(pc_isdead(sd)) clif_clearunit_area(&sd->bl, CLR_DEAD); |