Jelajahi Sumber

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://svn.code.sf.net/p/rathena/svn/trunk@16363 54d463be-8e91-2dee-dedb-b68131a5f0ec
shennetsind 13 tahun lalu
induk
melakukan
5a8d5ca222
1 mengubah file dengan 4 tambahan dan 0 penghapusan
  1. 4 0
      src/map/clif.c

+ 4 - 0
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);