1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-04-17 11:56:46 +02:00

One little fix for inconsistent indexes

This commit is contained in:
Tomasz Zieliński 2023-12-11 08:28:53 +01:00
parent 6fe8ed7a03
commit 493acd9b75

View File

@ -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;