summaryrefslogtreecommitdiff
path: root/src/map/map.c
diff options
context:
space:
mode:
authorshennetsind <ind@henn.et>2013-10-07 13:40:34 -0300
committershennetsind <ind@henn.et>2013-10-07 13:40:34 -0300
commitc56e3eb701658079f1de09db759f3b09327ec046 (patch)
treea37f7ff23a9adc9d7c725b85f94cf25685e30aba /src/map/map.c
parentbaa5c1fc386a706ba4bf4aa48409b8947274c928 (diff)
downloadhercules-c56e3eb701658079f1de09db759f3b09327ec046.tar.gz
hercules-c56e3eb701658079f1de09db759f3b09327ec046.tar.bz2
hercules-c56e3eb701658079f1de09db759f3b09327ec046.tar.xz
hercules-c56e3eb701658079f1de09db759f3b09327ec046.zip
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 <ind@henn.et>
Diffstat (limited to 'src/map/map.c')
-rw-r--r--src/map/map.c12
1 files changed, 8 insertions, 4 deletions
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