From 738829e75dbc881663f9953c512efca50f2242c1 Mon Sep 17 00:00:00 2001 From: shennetsind Date: Sun, 1 Jul 2012 15:54:24 +0000 Subject: 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 --- src/map/clif.c | 4 ++++ 1 file changed, 4 insertions(+) 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); -- cgit v1.2.3-70-g09d2