Преглед изворни кода

One little fix for inconsistent indexes

Tomasz Zieliński пре 1 година
родитељ
комит
493acd9b75
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;