1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-08-15 20:03:15 +02:00

Little refactoring for object placement.

This commit is contained in:
DjWarmonger
2016-01-13 19:17:12 +01:00
parent a39e61373c
commit 8c5f93dd8f

View File

@@ -20,6 +20,8 @@ void CMapGenerator::foreach_neighbour(const int3 &pos, std::function<void(int3&
for(const int3 &dir : int3::getDirs())
{
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))
foo(n);
}