Browse Source

- Optimized a bit the map set cell imperative so it only fails when the target cells are of native type wall/ground, so that it still allows setting/unsetting temporarily unwalkable types by using icewall types of cell.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11770 54d463be-8e91-2dee-dedb-b68131a5f0ec
skotlex 17 years ago
parent
commit
cd362b8ca9
1 changed files with 2 additions and 1 deletions
  1. 2 1
      src/map/npc.c

+ 2 - 1
src/map/npc.c

@@ -2544,7 +2544,8 @@ static const char* npc_parse_mapcell(char* w1, char* w2, char* w3, char* w4, con
 
 	for( x = x0; x <= x1; ++x )
 		for( y = y0; y <= y1; ++y ) {
-			if (map_getcell(m, x, y, CELL_CHKNOREACH))
+			int type = map_getcell(m, x, y, CELL_GETTYPE);
+			if (type == 1 || type == 5) //TODO: use defines for the cell types. 
 				continue;
 			map_setcell(m, x, y, cell);
 		}