2
0
mirror of https://github.com/Laupetin/OpenAssetTools.git synced 2025-09-04 07:47:25 +00:00

refactor: streamline phys preset dumping

This commit is contained in:
Jan Laupetin
2025-07-30 18:48:59 +01:00
parent d4ab0c4314
commit 24c9e08046
15 changed files with 258 additions and 234 deletions

View File

@@ -4,6 +4,7 @@
#include "Game/IW4/ObjConstantsIW4.h"
#include "InfoString/InfoString.h"
#include "InfoStringLoaderPhysPresetIW4.h"
#include "PhysPreset/PhysPresetCommon.h"
#include <format>
#include <iostream>
@@ -19,7 +20,7 @@ RawLoaderPhysPreset::RawLoaderPhysPreset(MemoryManager& memory, ISearchPath& sea
AssetCreationResult RawLoaderPhysPreset::CreateAsset(const std::string& assetName, AssetCreationContext& context)
{
const auto fileName = std::format("physic/{}", assetName);
const auto fileName = phys_preset::GetFileNameForAssetName(assetName);
const auto file = m_search_path.Open(fileName);
if (!file.IsOpen())
return AssetCreationResult::NoAction();