- changed model data to store models and textures by index instead of by pointer.

The indices are needed for efficient precaching and actual changes to the logic are minor so that this was the best option overall.
This commit is contained in:
Christoph Oelckers 2016-05-03 15:45:21 +02:00
commit f7fda94ec9
5 changed files with 73 additions and 65 deletions

View file

@ -213,7 +213,7 @@ FVoxelModel::FVoxelModel(FVoxel *voxel, bool owned)
{
mVoxel = voxel;
mOwningVoxel = owned;
mPalette = new FVoxelTexture(voxel);
mPalette = TexMan.AddTexture(new FVoxelTexture(voxel));
}
//===========================================================================
@ -224,7 +224,6 @@ FVoxelModel::FVoxelModel(FVoxel *voxel, bool owned)
FVoxelModel::~FVoxelModel()
{
delete mPalette;
if (mOwningVoxel) delete mVoxel;
}