summaryrefslogtreecommitdiff
path: root/src/map/map.c
diff options
context:
space:
mode:
authorultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-03-12 21:02:59 +0000
committerultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-03-12 21:02:59 +0000
commit882a3192acdd6ca2a6e50fc0f9fc877bc454efb7 (patch)
treed5cf4bf03fe0c2a8698aa088c0a17ebfe4d4f9a9 /src/map/map.c
parentcf66ac82f7269a192f31f9465b1187e73635ceb5 (diff)
downloadhercules-882a3192acdd6ca2a6e50fc0f9fc877bc454efb7.tar.gz
hercules-882a3192acdd6ca2a6e50fc0f9fc877bc454efb7.tar.bz2
hercules-882a3192acdd6ca2a6e50fc0f9fc877bc454efb7.tar.xz
hercules-882a3192acdd6ca2a6e50fc0f9fc877bc454efb7.zip
Removed one mob data variable related to dynamic mobs that I found to be redundant.
Changed MAX_MOBSKILL (max. amount of different skill entries per mob) from 50 to 40 to reduce memory consumption a bit more. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12350 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/map.c')
-rw-r--r--src/map/map.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/map/map.c b/src/map/map.c
index 27eeab5d2..118e1b99a 100644
--- a/src/map/map.c
+++ b/src/map/map.c
@@ -2019,15 +2019,15 @@ int mob_cache_cleanup_sub(struct block_list *bl, va_list ap)
nullpo_retr(0, md);
//When not to remove:
- //Mob has the cached flag on 0
+ //Mob is not in cache
if (!md->special_state.cached)
return 0;
- if (!battle_config.mob_remove_damaged &&
- md->status.hp < md->status.max_hp)
+ //Mob is damaged and mob_remove_damaged is off
+ if (!battle_config.mob_remove_damaged && md->status.hp < md->status.max_hp)
{
- if (md->spawn && md->spawn_n >= 0) //Do not respawn mob later.
- map[md->spawn->m].moblist[md->spawn_n]->skip++;
- return 0; //Do not remove damaged mobs.
+ if( md->spawn ) //Do not respawn mob later.
+ md->spawn->skip++;
+ return 0;
}
unit_free(&md->bl,0);