Skip to content

Commit

Permalink
Update regions.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
OldFoolAgain committed Aug 29, 2023
1 parent bc69328 commit e31f094
Showing 1 changed file with 25 additions and 1 deletion.
26 changes: 25 additions & 1 deletion source/regions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -771,8 +771,32 @@ auto CMapHandler::SaveTest() ->void {
}
}
startSave(streamData);
}
}
Console << "\b\b\b\b" << static_cast<std::uint32_t>( 100 ) << "%";
auto filename = basePath + "overflow.wsc"s;
auto writeDestination = std::ofstream( filename.c_str() );

}
if( writeDestination.is_open() ) {
overFlow.SaveToDisk( writeDestination );
writeDestination.close();
}
else {
Console.Error( oldstrutil::format( "Failed to open %s for writing", filename.c_str() ));
return;
}

Console << "\b\b\b\b";
Console.PrintDone();

const auto e_t = static_cast<std::uint32_t>(GetClock());
Console.Print( oldstrutil::format( "World saved in %.02fsec\n", ( static_cast<R32>( e_t - s_t )) / 1000.0f ));

i = 0;
for( auto wIter = mapWorlds.begin(); wIter != mapWorlds.end(); ++wIter )
{
( *wIter )->SaveResources( i );
++i;
}

}
Expand Down

0 comments on commit e31f094

Please sign in to comment.