瀏覽代碼

Corrected a compilation error (#3423)

* Fixes #3422.
* Resolves CELL_NOSTACK having a compile error when enabled.
Thanks to @SnotraRM!
Aleos 6 年之前
父節點
當前提交
7730160299
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      src/map/map.cpp

+ 2 - 2
src/map/map.cpp

@@ -295,7 +295,7 @@ static void map_addblcell(struct block_list *bl)
 
 	if( bl->m<0 || bl->x<0 || bl->x>=mapdata->xs || bl->y<0 || bl->y>=mapdata->ys || !(bl->type&BL_CHAR) )
 		return;
-	mapdata->cell[bl->x+bl->y*mapdata->cell_bl++;
+	mapdata->cell[bl->x+bl->y*mapdata->xs].cell_bl++;
 	return;
 }
 
@@ -305,7 +305,7 @@ static void map_delblcell(struct block_list *bl)
 
 	if( bl->m <0 || bl->x<0 || bl->x>=mapdata->xs || bl->y<0 || bl->y>=mapdata->ys || !(bl->type&BL_CHAR) )
 		return;
-	mapdata->cell[bl->x+bl->y*mapdata->cell_bl--;
+	mapdata->cell[bl->x+bl->y*mapdata->xs].cell_bl--;
 }
 #endif