Przeglądaj źródła

Fixed crash due to incorrect monolith id scopes

Tomasz Zieliński 1 rok temu
rodzic
commit
0f23dde85d

+ 5 - 1
lib/mapObjectConstructors/CObjectClassesHandler.cpp

@@ -452,10 +452,14 @@ void CObjectClassesHandler::generateExtraMonolithsForRMG(ObjectClass * container
 		newPortal->type = portal->getIndex();
 
 		newPortal->subtype = portalVec.size(); //indexes must be unique, they are returned as a set
+		newPortal->blockVisit = portal->blockVisit;
+		newPortal->removable = portal->removable;
 
 		portalVec.push_back(newPortal);
 
-		registerObject(ModScope::scopeGame(), container->getJsonKey(), newPortal->subTypeName, newPortal->subtype);
+
+		registerObject(newPortal->modScope, container->getJsonKey(), newPortal->subTypeName, newPortal->subtype);
+		//registerObject(ModScope::scopeBuiltin(), container->getJsonKey(), newPortal->subTypeName, newPortal->subtype);
 	}
 }