From c56e3eb701658079f1de09db759f3b09327ec046 Mon Sep 17 00:00:00 2001 From: shennetsind Date: Mon, 7 Oct 2013 13:40:34 -0300 Subject: Fixed Bug #7744 Adjusted missing #ifdef behavior to be friendly to the hooking. http://hercules.ws/board/tracker/issue-7744-compiler-error-on-hpm-hooking-after-undefined-packetver-re/ Signed-off-by: shennetsind --- src/map/map.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src/map/map.c') diff --git a/src/map/map.c b/src/map/map.c index 0c684542d..d920875ee 100644 --- a/src/map/map.c +++ b/src/map/map.c @@ -137,26 +137,32 @@ int map_freeblock_timer(int tid, unsigned int tick, int id, intptr_t data) { return 0; } -#ifdef CELL_NOSTACK /*========================================== * These pair of functions update the counter of how many objects * lie on a tile. *------------------------------------------*/ void map_addblcell(struct block_list *bl) { +#ifdef CELL_NOSTACK if( bl->m < 0 || bl->x < 0 || bl->x >= map->list[bl->m].xs || bl->y < 0 || bl->y >= map->list[bl->m].ys || !(bl->type&BL_CHAR) ) return; map->list[bl->m].cell[bl->x+bl->y*map->list[bl->m].xs].cell_bl++; +#else + return; +#endif } void map_delblcell(struct block_list *bl) { +#ifdef CELL_NOSTACK if( bl->m < 0 || bl->x < 0 || bl->x >= map->list[bl->m].xs || bl->y < 0 || bl->y >= map->list[bl->m].ys || !(bl->type&BL_CHAR) ) map->list[bl->m].cell[bl->x+bl->y*map->list[bl->m].xs].cell_bl--; -} +#else + return; #endif +} /*========================================== * Adds a block to the map. @@ -5792,10 +5798,8 @@ void map_defaults(void) { map->versionscreen = map_versionscreen; map->arg_next_value = map_arg_next_value; -#ifdef CELL_NOSTACK map->addblcell = map_addblcell; map->delblcell = map_delblcell; -#endif /** * mapit interface -- cgit v1.2.3-60-g2f50