From a2b971ef0af9491bdbd93e07e600a69df97a46a1 Mon Sep 17 00:00:00 2001 From: skotlex Date: Fri, 18 Aug 2006 13:49:24 +0000 Subject: - Changed unit_free so that it receives which cleartype should be used when the character is still on a map. Used this on status_damage so that mobs that do not respawn when killed will properly display the death animation. - Should have fixed the signed/unsigned comparison warnings in the main regen function. - Fixed Energy Coat consuming 10x less SP per hit than it should. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8339 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/map.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/map/map.c') diff --git a/src/map/map.c b/src/map/map.c index 422d1f3a9..6d359e412 100644 --- a/src/map/map.c +++ b/src/map/map.c @@ -1670,9 +1670,9 @@ int map_quit(struct map_session_data *sd) { npc_script_event(sd, NPCE_LOGOUT); sd->state.waitingdisconnect = 1; - if (sd->pd) unit_free(&sd->pd->bl); - if (sd->hd) unit_free(&sd->hd->bl); - unit_free(&sd->bl); + if (sd->pd) unit_free(&sd->pd->bl,0); + if (sd->hd) unit_free(&sd->hd->bl,0); + unit_free(&sd->bl,3); chrif_save(sd,1); } else { //Try to free some data, without saving anything (this could be invoked on map server change. [Skotlex] if (sd->bl.prev != NULL) @@ -1991,7 +1991,7 @@ int mob_cache_cleanup_sub(struct block_list *bl, va_list ap) { md->status.hp < md->status.max_hp) return 0; //Do not remove damaged mobs. - unit_free(&md->bl); + unit_free(&md->bl,0); return 1; } @@ -3617,7 +3617,7 @@ int cleanup_sub(struct block_list *bl, va_list ap) { npc_unload((struct npc_data *)bl); break; case BL_MOB: - unit_free(bl); + unit_free(bl,0); break; case BL_PET: //There is no need for this, the pet is removed together with the player. [Skotlex] -- cgit v1.2.3-60-g2f50