浏览代码

Merge pull request #3299 from vcmi/fix_monolith_indexes

One little fix for inconsistent indexes
Ivan Savenko 1 年之前
父节点
当前提交
e8409bf555
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      lib/mapObjectConstructors/CObjectClassesHandler.cpp

+ 2 - 1
lib/mapObjectConstructors/CObjectClassesHandler.cpp

@@ -451,7 +451,8 @@ void CObjectClassesHandler::generateExtraMonolithsForRMG(ObjectClass * container
 		newPortal->subTypeName = std::string("monolith") + std::to_string(portalVec.size());
 		newPortal->type = portal->getIndex();
 
-		newPortal->subtype = portalVec.size(); //indexes must be unique, they are returned as a set
+		// Inconsintent original indexing: monolith1 has index 0
+		newPortal->subtype = portalVec.size() - 1; //indexes must be unique, they are returned as a set
 		newPortal->blockVisit = portal->blockVisit;
 		newPortal->removable = portal->removable;