mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-04-20 08:05:45 +00:00
Fix IW4 XModel Surfaces not being copied even though they are being loaded into the temp block
This commit is contained in:
parent
4d37d37fd7
commit
54579deea4
@ -25,6 +25,7 @@ set count boneInfo numBones;
|
|||||||
// XModelLodInfo
|
// XModelLodInfo
|
||||||
use XModelLodInfo;
|
use XModelLodInfo;
|
||||||
set block modelSurfs XFILE_BLOCK_TEMP;
|
set block modelSurfs XFILE_BLOCK_TEMP;
|
||||||
|
set action modelSurfs SetModelSurfs(XModelLodInfo, XModelSurfs);
|
||||||
set reusable modelSurfs;
|
set reusable modelSurfs;
|
||||||
set condition surfs never;
|
set condition surfs never;
|
||||||
|
|
||||||
|
19
src/ZoneLoading/Game/IW4/XAssets/xmodel/xmodel_actions.cpp
Normal file
19
src/ZoneLoading/Game/IW4/XAssets/xmodel/xmodel_actions.cpp
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
#include "xmodel_actions.h"
|
||||||
|
|
||||||
|
#include <cstring>
|
||||||
|
|
||||||
|
using namespace IW4;
|
||||||
|
|
||||||
|
Actions_XModel::Actions_XModel(Zone* zone)
|
||||||
|
: AssetLoadingActions(zone)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void Actions_XModel::SetModelSurfs(XModelLodInfo* lodInfo, XModelSurfs* modelSurfs) const
|
||||||
|
{
|
||||||
|
if(modelSurfs)
|
||||||
|
{
|
||||||
|
lodInfo->modelSurfs = m_zone->GetMemory()->Create<XModelSurfs>();
|
||||||
|
memcpy(lodInfo->modelSurfs, modelSurfs, sizeof(XModelSurfs));
|
||||||
|
}
|
||||||
|
}
|
15
src/ZoneLoading/Game/IW4/XAssets/xmodel/xmodel_actions.h
Normal file
15
src/ZoneLoading/Game/IW4/XAssets/xmodel/xmodel_actions.h
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "Loading/AssetLoadingActions.h"
|
||||||
|
#include "Game/IW4/IW4.h"
|
||||||
|
|
||||||
|
namespace IW4
|
||||||
|
{
|
||||||
|
class Actions_XModel final : public AssetLoadingActions
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
explicit Actions_XModel(Zone* zone);
|
||||||
|
|
||||||
|
void SetModelSurfs(XModelLodInfo* lodInfo, XModelSurfs* modelSurfs) const;
|
||||||
|
};
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user