- fixed issue with empty voxel slots.

This commit is contained in:
Christoph Oelckers 2021-03-25 08:37:44 +01:00
parent 13bbf0a4f9
commit 463dbc4c4f

View file

@ -206,10 +206,13 @@ void PolymostProcessVoxels(void)
for (int i = 0; i < MAXVOXELS; i++) for (int i = 0; i < MAXVOXELS; i++)
{ {
int lumpnum = voxlumps[i]; int lumpnum = voxlumps[i];
if (lumpnum >= 0) if (lumpnum > 0)
{ {
voxmodels[i] = voxload(lumpnum); voxmodels[i] = voxload(lumpnum);
voxmodels[i]->scale = voxscale[i] * (1.f / 65536.f); if (voxmodels[i])
voxmodels[i]->scale = voxscale[i] * (1.f / 65536.f);
else
Printf("Unable to load voxel from %s\n", fileSystem.GetFileFullPath(lumpnum));
} }
} }
} }