mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-29 23:07:48 +02:00
committed by
Andrii Danylchenko
parent
205bb09880
commit
aaa07e4d2e
@@ -49,7 +49,7 @@ void CPrivilegedInfoCallback::getFreeTiles(std::vector<int3> & tiles) const
|
||||
for (int yd = 0; yd < gs->map->height; yd++)
|
||||
{
|
||||
tinfo = getTile(int3 (xd,yd,zd));
|
||||
if (tinfo->terType != ETerrainType::WATER && tinfo->terType != ETerrainType::ROCK && !tinfo->blocked) //land and free
|
||||
if (tinfo->terType.isLand() && tinfo->terType.isPassable() && !tinfo->blocked) //land and free
|
||||
tiles.push_back (int3 (xd,yd,zd));
|
||||
}
|
||||
}
|
||||
@@ -116,8 +116,8 @@ void CPrivilegedInfoCallback::getAllTiles(std::unordered_set<int3, ShashInt3> &
|
||||
{
|
||||
for (int yd = 0; yd < gs->map->height; yd++)
|
||||
{
|
||||
if ((getTile (int3 (xd,yd,zd))->terType == ETerrainType::WATER && water)
|
||||
|| (getTile (int3 (xd,yd,zd))->terType != ETerrainType::WATER && land))
|
||||
if ((getTile (int3 (xd,yd,zd))->terType.isWater() && water)
|
||||
|| (getTile (int3 (xd,yd,zd))->terType.isLand() && land))
|
||||
tiles.insert(int3(xd,yd,zd));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user