mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-11-23 13:12:06 +00:00
The FinalizeZone step can now fail and the zone link will not ouput a fastfile if the FinalizeZone step fails.
This commit is contained in:
@@ -30,23 +30,18 @@ namespace
|
||||
return AssetCreationResult::NoAction();
|
||||
}
|
||||
|
||||
void FinalizeZone(AssetCreationContext& context) override
|
||||
bool FinalizeZone(AssetCreationContext& context) override
|
||||
{
|
||||
// custom maps must have a map_gfx file
|
||||
std::string mapGfxFileName = "map_gfx.fbx";
|
||||
auto mapGfxFile = m_search_path.Open(BSPUtil::getFileNameForBSPAsset(mapGfxFileName));
|
||||
if (!mapGfxFile.IsOpen())
|
||||
return;
|
||||
|
||||
std::unique_ptr<BSPData> bsp = BSP::createBSPData(m_zone.m_name, m_search_path);
|
||||
if (bsp == nullptr)
|
||||
return;
|
||||
return false;
|
||||
|
||||
BSPLinker linker(m_memory, m_search_path, context);
|
||||
if (!linker.linkBSP(bsp.get()))
|
||||
bool result = linker.linkBSP(bsp.get());
|
||||
if (!result)
|
||||
con::error("BSP link has failed.");
|
||||
|
||||
return;
|
||||
return result;
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user