1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-24 22:14:36 +02:00

Merge pull request #3299 from vcmi/fix_monolith_indexes

One little fix for inconsistent indexes
This commit is contained in:
Ivan Savenko 2023-12-11 15:03:06 +02:00 committed by GitHub
commit e8409bf555
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -451,7 +451,8 @@ void CObjectClassesHandler::generateExtraMonolithsForRMG(ObjectClass * container
newPortal->subTypeName = std::string("monolith") + std::to_string(portalVec.size()); newPortal->subTypeName = std::string("monolith") + std::to_string(portalVec.size());
newPortal->type = portal->getIndex(); 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->blockVisit = portal->blockVisit;
newPortal->removable = portal->removable; newPortal->removable = portal->removable;