summaryrefslogtreecommitdiff
path: root/src/map/mob.c
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-02-21 17:47:45 +0300
committerAndrei Karas <akaras@inbox.ru>2015-02-23 23:36:18 +0300
commit4e681ce12a3f9574c33dc1e11ca8665e8f04e8a0 (patch)
tree2821d43a8b8017c659376a3542fe281795d6d307 /src/map/mob.c
parent6b949190402e71d5c489f627da79eb5f51669b44 (diff)
downloadhercules-4e681ce12a3f9574c33dc1e11ca8665e8f04e8a0.tar.gz
hercules-4e681ce12a3f9574c33dc1e11ca8665e8f04e8a0.tar.bz2
hercules-4e681ce12a3f9574c33dc1e11ca8665e8f04e8a0.tar.xz
hercules-4e681ce12a3f9574c33dc1e11ca8665e8f04e8a0.zip
Extend official_cell_stack_limit option.
Now if this option is zero server will not count objects before comparing with official_cell_stack_limit. If set official_cell_stack_limit to zero it will heavy reduce CPU usage.
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);
}