summaryrefslogtreecommitdiff
path: root/src/map/map.c
diff options
context:
space:
mode:
authorshenhuyong <shenhuyong@hotmail.com>2013-10-08 01:54:20 +0800
committershenhuyong <shenhuyong@hotmail.com>2013-10-08 01:54:20 +0800
commit33622377e840c6d15ee7f65a1e4b9b9a815bd69b (patch)
tree6984312a8856cc67d5032a533eb6ad70cae19e9d /src/map/map.c
parent0a14a122a02aeac9b8cf007eb727cdab846f2329 (diff)
parent07cbb72a3e89ba0fe1fb4b3bed1cac6568259999 (diff)
downloadhercules-33622377e840c6d15ee7f65a1e4b9b9a815bd69b.tar.gz
hercules-33622377e840c6d15ee7f65a1e4b9b9a815bd69b.tar.bz2
hercules-33622377e840c6d15ee7f65a1e4b9b9a815bd69b.tar.xz
hercules-33622377e840c6d15ee7f65a1e4b9b9a815bd69b.zip
Merge branch 'master' of https://github.com/HerculesWS/Hercules
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