1
Fork 0
mirror of https://github.com/SapphireServer/Sapphire.git synced 2025-04-25 14:07:46 +00:00

fix pcb_reader not exporting terrain in composite zone objects

This commit is contained in:
NotAdam 2019-01-26 15:19:54 +11:00
parent 83eeacb1ce
commit 80c06a76b4
2 changed files with 10 additions and 11 deletions

View file

@ -32,7 +32,7 @@
// garbage to ignore models
bool noObj = false;
std::string gamePath( "C:\\SquareEnix\\FINAL FANTASY XIV - A Realm Reborn\\game\\sqpack" );
std::string gamePath( "/mnt/c/Program Files (x86)/Steam/steamapps/common/FINAL FANTASY XIV Online/game/sqpack" );
std::unordered_map< uint16_t, std::string > zoneNameMap;
uint32_t zoneId;
@ -325,6 +325,7 @@ int main( int argc, char* argv[] )
buildModelEntry( pPcbFile, exportedTerrainGroup, fileName, zoneName );
}
exportMgr.exportGroup( zoneName, exportedTerrainGroup, ( ExportFileType )exportFileType );
exportedZone.groups.emplace( zoneName, exportedTerrainGroup );
for( const auto& lgb : lgbList )
{
@ -393,10 +394,10 @@ int main( int argc, char* argv[] )
}
}
exportMgr.exportGroup( zoneName, exportedGroup, ( ExportFileType )exportFileType );
//exportedZone.groups.emplace( group.name, exportedGroup );
exportedZone.groups.emplace( group.name, exportedGroup );
}
}
//exportMgr.exportZone( exportedZone, ( ExportFileType )exportFileType );
exportMgr.exportZone( exportedZone, ( ExportFileType )exportFileType );
printf( "Exported %s in %lu seconds \n",
@ -416,8 +417,6 @@ int main( int argc, char* argv[] )
printf( "Finished all tasks in %lu seconds\n",
std::chrono::duration_cast< std::chrono::seconds >( std::chrono::high_resolution_clock::now() - startTime ).count() );
getchar();
delete eData;
delete data1;

View file

@ -20,14 +20,14 @@ public:
auto start = std::chrono::high_resolution_clock::now();
auto dir = currPath + "/" + zone.name + "/";
auto fileName = dir + "/" + zone.name + ".obj";
auto dir = currPath + "/pcb_export/" + zone.name + "/";
auto fileName = dir + zone.name + ".obj";
std::error_code e;
if( !std::experimental::filesystem::exists( dir, e ) )
{
if( !std::experimental::filesystem::create_directory( dir, e ) )
if( !std::experimental::filesystem::create_directories( dir, e ) )
{
printf( "Unable to create directory '%s'", ( dir ).c_str() );
return;
@ -61,13 +61,13 @@ public:
auto start = std::chrono::high_resolution_clock::now();
auto dir = currPath + "/" + zoneName + "/";
auto fileName = dir + "/" + group.name + ".obj";
auto dir = currPath + "/pcb_export/" + zoneName + "/groups/";
auto fileName = dir + group.name + ".obj";
std::error_code e;
if( !std::experimental::filesystem::exists( dir, e ) )
{
if( !std::experimental::filesystem::create_directory( dir, e ) )
if( !std::experimental::filesystem::create_directories( dir, e ) )
{
printf( "Unable to create directory '%s'", ( dir ).c_str() );
return;