1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-09-16 09:26:28 +02:00

New terrain support - part 1 (#755)

Initial support of new terrains
This commit is contained in:
Nordsoft91
2022-06-20 17:39:50 +03:00
committed by Andrii Danylchenko
parent 205bb09880
commit aaa07e4d2e
103 changed files with 1066 additions and 1472 deletions

View File

@@ -419,7 +419,7 @@ int3 IBoatGenerator::bestLocation() const
{
if(const TerrainTile *tile = IObjectInterface::cb->getTile(o->pos + offset, false)) //tile is in the map
{
if(tile->terType == ETerrainType::WATER && (!tile->blocked || tile->blockingObjects.front()->ID == Obj::BOAT)) //and is water and is not blocked or is blocked by boat
if(tile->terType.isWater() && (!tile->blocked || tile->blockingObjects.front()->ID == Obj::BOAT)) //and is water and is not blocked or is blocked by boat
return o->pos + offset;
}
}