Pārlūkot izejas kodu

Little refactoring for object placement.

DjWarmonger 9 gadi atpakaļ
vecāks
revīzija
8c5f93dd8f
1 mainītis faili ar 2 papildinājumiem un 0 dzēšanām
  1. 2 0
      lib/rmg/CMapGenerator.cpp

+ 2 - 0
lib/rmg/CMapGenerator.cpp

@@ -20,6 +20,8 @@ void CMapGenerator::foreach_neighbour(const int3 &pos, std::function<void(int3&
 	for(const int3 &dir : int3::getDirs())
 	for(const int3 &dir : int3::getDirs())
 	{
 	{
 		int3 n = pos + dir;
 		int3 n = pos + dir;
+		/*important notice: perform any translation before this function is called,
+		so the actual map position is checked*/
 		if(map->isInTheMap(n))
 		if(map->isInTheMap(n))
 			foo(n);
 			foo(n);
 	}
 	}