summaryrefslogtreecommitdiff
path: root/src/map/mob.c
diff options
context:
space:
mode:
authorshennetsind <shennetsind@users.noreply.github.com>2015-02-24 14:44:46 -0300
committershennetsind <shennetsind@users.noreply.github.com>2015-02-24 14:44:46 -0300
commit214eec8dc196b0eb8c85e4ae616942bd77075a96 (patch)
treed86261dd02bd434166f8ebf23511926b7d84deeb /src/map/mob.c
parent6b949190402e71d5c489f627da79eb5f51669b44 (diff)
parentad0dfc94fb7cd3c2f4099821b4b49153165a579f (diff)
downloadhercules-214eec8dc196b0eb8c85e4ae616942bd77075a96.tar.gz
hercules-214eec8dc196b0eb8c85e4ae616942bd77075a96.tar.bz2
hercules-214eec8dc196b0eb8c85e4ae616942bd77075a96.tar.xz
hercules-214eec8dc196b0eb8c85e4ae616942bd77075a96.zip
Merge pull request #463 from 4144/cellstack
Improve performance with many mobs in small area
Diffstat (limited to 'src/map/mob.c')
-rw-r--r--src/map/mob.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/map/mob.c b/src/map/mob.c
index a94650438..8a8e96508 100644
--- a/src/map/mob.c
+++ b/src/map/mob.c
@@ -1311,7 +1311,7 @@ int mob_unlocktarget(struct mob_data *md, int64 tick) {
md->ud.target_to = 0;
unit->set_target(&md->ud, 0);
}
- if(map->count_oncell(md->bl.m, md->bl.x, md->bl.y, BL_CHAR|BL_NPC, 1) > battle_config.official_cell_stack_limit) {
+ if(battle_config.official_cell_stack_limit && map->count_oncell(md->bl.m, md->bl.x, md->bl.y, BL_CHAR|BL_NPC, 1) > battle_config.official_cell_stack_limit) {
unit->walktoxy(&md->bl, md->bl.x, md->bl.y, 8);
}