Browse Source

Check for visitable objects when selecting boat location and not blocked

Ivan Savenko 4 months ago
parent
commit
4b05fb204d
1 changed files with 4 additions and 1 deletions
  1. 4 1
      lib/mapObjects/IObjectInterface.cpp

+ 4 - 1
lib/mapObjects/IObjectInterface.cpp

@@ -95,9 +95,12 @@ int3 IBoatGenerator::bestLocation() const
 			continue;
 
 		if (tile->blocked())
+			continue;
+
+		if (tile->visitable())
 		{
 			bool hasBoat = false;
-			for (auto const & objectID : tile->blockingObjects)
+			for (auto const & objectID : tile->visitableObjects)
 			{
 				const auto * object = getObject()->cb->getObj(objectID);
 				if (object->ID == Obj::BOAT || object->ID == Obj::HERO)