From 976fbf94f821782401d01e7d5b392f280b67eb1e Mon Sep 17 00:00:00 2001 From: Jan Date: Tue, 2 Apr 2024 23:52:38 +0200 Subject: [PATCH] fix: make vertex decl asset references work when building --- .../Game/IW4/AssetLoaders/AssetLoaderVertexDecl.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/ObjLoading/Game/IW4/AssetLoaders/AssetLoaderVertexDecl.cpp b/src/ObjLoading/Game/IW4/AssetLoaders/AssetLoaderVertexDecl.cpp index d86d02c6..65fff5cb 100644 --- a/src/ObjLoading/Game/IW4/AssetLoaders/AssetLoaderVertexDecl.cpp +++ b/src/ObjLoading/Game/IW4/AssetLoaders/AssetLoaderVertexDecl.cpp @@ -48,6 +48,10 @@ bool AssetLoaderVertexDecl::LoadFromRaw( MaterialVertexDeclaration decl{}; size_t currentOffset = 0u; + + if (!assetName.empty() && assetName[0] == ',') + currentOffset = 1u; + std::string sourceAbbreviation; while (NextAbbreviation(assetName, sourceAbbreviation, currentOffset)) {