浏览代码

Removed a flag check
* Removed an unneeded check for finding an empty cell for homunculus.

aleos 7 年之前
父节点
当前提交
aedb38771a
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      src/map/unit.c

+ 2 - 2
src/map/unit.c

@@ -2395,10 +2395,10 @@ int unit_calc_pos(struct block_list *bl, int tx, int ty)
 	ud->to_x = tx;
 	ud->to_y = ty;
 
-	map_search_freecell(bl, bl->m, &ud->to_x, &ud->to_y, 3, 3, 1|2|4);
+	map_search_freecell(bl, bl->m, &ud->to_x, &ud->to_y, 3, 3, 1|2);
 
 	if (!unit_can_reach_pos(bl, ud->to_x, ud->to_y, 0)) { // Attempt once more
-		map_search_freecell(bl, bl->m, &ud->to_x, &ud->to_y, 3, 3, 1|2|4);
+		map_search_freecell(bl, bl->m, &ud->to_x, &ud->to_y, 3, 3, 1|2);
 
 		if (!unit_can_reach_pos(bl, ud->to_x, ud->to_y, 0))
 			return 1;