Explorar o código

Fixed crash due to incorrect monolith id scopes

Tomasz Zieliński hai 1 ano
pai
achega
0f23dde85d
Modificáronse 1 ficheiros con 5 adicións e 1 borrados
  1. 5 1
      lib/mapObjectConstructors/CObjectClassesHandler.cpp

+ 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);
 	}
 }