mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-24 08:00:14 +00:00
Add pre-computed WMO floor cache and improve save logging
- Add initial floor cache for faster collision on first run - Log absolute path when saving cache for debugging
This commit is contained in:
parent
a96ea0758c
commit
125cf588bb
3 changed files with 13 additions and 2 deletions
|
|
@ -517,8 +517,15 @@ void WMORenderer::resetQueryStats() {
|
|||
bool WMORenderer::saveFloorCache(const std::string& filepath) const {
|
||||
// Create directory if needed
|
||||
std::filesystem::path path(filepath);
|
||||
std::filesystem::path absPath = std::filesystem::absolute(path);
|
||||
core::Logger::getInstance().info("Saving floor cache to: ", absPath.string());
|
||||
|
||||
if (path.has_parent_path()) {
|
||||
std::filesystem::create_directories(path.parent_path());
|
||||
std::error_code ec;
|
||||
std::filesystem::create_directories(path.parent_path(), ec);
|
||||
if (ec) {
|
||||
core::Logger::getInstance().error("Failed to create cache directory: ", ec.message());
|
||||
}
|
||||
}
|
||||
|
||||
std::ofstream file(filepath, std::ios::binary);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue