Răsfoiți Sursa

Restrict reindexing to random maps

Tomasz Zieliński 1 an în urmă
părinte
comite
12da0196a0
2 a modificat fișierele cu 1 adăugiri și 1 ștergeri
  1. 0 1
      lib/mapping/CMapService.cpp
  2. 1 0
      lib/rmg/CMapGenerator.cpp

+ 0 - 1
lib/mapping/CMapService.cpp

@@ -89,7 +89,6 @@ void CMapService::saveMap(const std::unique_ptr<CMap> & map, boost::filesystem::
 		tmp.flush();
 		tmp.close();
 	}
-	map->reindexObjects();
 }
 
 ModCompatibilityInfo CMapService::verifyMapHeaderMods(const CMapHeader & map)

+ 1 - 0
lib/rmg/CMapGenerator.cpp

@@ -419,6 +419,7 @@ void CMapGenerator::fillZones()
 	auto grailZone = *RandomGeneratorUtil::nextItem(treasureZones, rand);
 
 	map->getMap(this).grailPos = *RandomGeneratorUtil::nextItem(grailZone->freePaths()->getTiles(), rand);
+	map->getMap(this).reindexObjects();
 
 	logGlobal->info("Zones filled successfully");