From 4e681ce12a3f9574c33dc1e11ca8665e8f04e8a0 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 21 Feb 2015 17:47:45 +0300 Subject: 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. --- src/map/unit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/map/unit.c') diff --git a/src/map/unit.c b/src/map/unit.c index 6e4efd533..b8e84492b 100644 --- a/src/map/unit.c +++ b/src/map/unit.c @@ -454,7 +454,7 @@ int unit_walktoxy_timer(int tid, int64 tick, int id, intptr_t data) { ud->to_x = bl->x; ud->to_y = bl->y; - if(map->count_oncell(bl->m, x, y, BL_CHAR|BL_NPC, 1) > battle_config.official_cell_stack_limit) { + if(battle_config.official_cell_stack_limit && map->count_oncell(bl->m, x, y, BL_CHAR|BL_NPC, 1) > battle_config.official_cell_stack_limit) { //Walked on occupied cell, call unit_walktoxy again if(ud->steptimer != INVALID_TIMER) { //Execute step timer on next step instead -- cgit v1.2.3-60-g2f50