mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-04-19 15:52:53 +00:00
Fixed MapEnts dumping in wrong folder
This commit is contained in:
parent
a447dd29fa
commit
b215b22018
@ -1,6 +1,5 @@
|
|||||||
#include "AssetDumperMapEnts.h"
|
#include "AssetDumperMapEnts.h"
|
||||||
|
|
||||||
#include <format>
|
|
||||||
#include <filesystem>
|
#include <filesystem>
|
||||||
|
|
||||||
using namespace T6;
|
using namespace T6;
|
||||||
@ -15,13 +14,13 @@ void AssetDumperMapEnts::DumpAsset(AssetDumpingContext& context, XAssetInfo<MapE
|
|||||||
const auto* mapEnts = asset->Asset();
|
const auto* mapEnts = asset->Asset();
|
||||||
|
|
||||||
std::filesystem::path mapEntsPath(mapEnts->name);
|
std::filesystem::path mapEntsPath(mapEnts->name);
|
||||||
mapEntsPath.replace_extension("map");
|
mapEntsPath.replace_extension("ents");
|
||||||
|
|
||||||
const auto mapEntsFile = context.OpenAssetFile(std::format("maps/{}", mapEntsPath.filename().string()));
|
const auto mapEntsFile = context.OpenAssetFile(mapEntsPath.string());
|
||||||
|
|
||||||
if (!mapEntsFile)
|
if (!mapEntsFile)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
auto& stream = *mapEntsFile;
|
auto& stream = *mapEntsFile;
|
||||||
stream.write(mapEnts->entityString, mapEnts->numEntityChars);
|
stream.write(mapEnts->entityString, mapEnts->numEntityChars - 1);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user