From def3d25249e226770832d8c35bd029a680c2af40 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Sat, 28 Mar 2020 16:19:35 +0800 Subject: [PATCH] Set proper dependencies for packed collision build --- .../build_world_packed_col.cpp | 1 + .../build_world_packed_col/builder_config.cpp | 14 ++++++++++++++ .../server/build_world_packed_col/builder_config.h | 2 ++ 3 files changed, 17 insertions(+) diff --git a/code/ryzom/tools/server/build_world_packed_col/build_world_packed_col.cpp b/code/ryzom/tools/server/build_world_packed_col/build_world_packed_col.cpp index 4bbae8233..f274f29cc 100644 --- a/code/ryzom/tools/server/build_world_packed_col/build_world_packed_col.cpp +++ b/code/ryzom/tools/server/build_world_packed_col/build_world_packed_col.cpp @@ -118,6 +118,7 @@ int main(int argc, char* argv[]) CPath::remapExtension("dds", "png", true); // R2::CScenarioEntryPoints &sep = R2::CScenarioEntryPoints::getInstance(); + sep.setFiles(builderConfig.CompleteIslandsFile, builderConfig.EntryPointsFile); try { sep.loadCompleteIslands(); diff --git a/code/ryzom/tools/server/build_world_packed_col/builder_config.cpp b/code/ryzom/tools/server/build_world_packed_col/builder_config.cpp index 32778a8c2..11e8a0524 100644 --- a/code/ryzom/tools/server/build_world_packed_col/builder_config.cpp +++ b/code/ryzom/tools/server/build_world_packed_col/builder_config.cpp @@ -28,6 +28,8 @@ CBuilderConfig::CBuilderConfig() CachePath = "island_packed_zones_cache"; CWMapCachePath = "island_cwmap_cache"; OutputPath = "islands_col_meshes"; + CompleteIslandsFile = "r2_islands.xml"; + EntryPointsFile = "r2_entry_points.txt"; CamSpeed = 100; Fly = false; HeightMapsAsTga = false; @@ -76,6 +78,18 @@ void CBuilderConfig::build(NLMISC::CConfigFile &cf) } } // + CConfigFile::CVar *completeIslandsFileVar = cf.getVarPtr("CompleteIslandsFile"); + if (completeIslandsFileVar) + { + CompleteIslandsFile = completeIslandsFileVar->asString(); + } + // + CConfigFile::CVar *entryPointsFileVar = cf.getVarPtr("EntryPointsFile"); + if (entryPointsFileVar) + { + EntryPointsFile = entryPointsFileVar->asString(); + } + // CConfigFile::CVar *camSpeedVar = cf.getVarPtr("CamSpeed"); if (camSpeedVar) { diff --git a/code/ryzom/tools/server/build_world_packed_col/builder_config.h b/code/ryzom/tools/server/build_world_packed_col/builder_config.h index 86fa380b0..9f64bfb0f 100644 --- a/code/ryzom/tools/server/build_world_packed_col/builder_config.h +++ b/code/ryzom/tools/server/build_world_packed_col/builder_config.h @@ -31,6 +31,8 @@ public: std::vector SearchPaths; std::vector CWMapList; std::string CWMapCachePath; + std::string CompleteIslandsFile; + std::string EntryPointsFile; float CamSpeed; bool Fly; bool HeightMapsAsTga;