- Force all voxel mip levels so use the same pivot point as the first level.

SVN r4217 (trunk)
This commit is contained in:
Randy Heit 2013-04-16 20:22:01 +00:00
parent 6dc21f9a8b
commit 865a535af2

View file

@ -296,6 +296,14 @@ FVoxel *R_LoadKVX(int lumpnum)
} }
voxel->NumMips = mip; voxel->NumMips = mip;
// Fix pivot data for submips, since some tools seem to like to just center these.
for (i = 1; i < mip; ++i)
{
voxel->Mips[i].PivotX = voxel->Mips[0].PivotX >> i;
voxel->Mips[i].PivotY = voxel->Mips[0].PivotY >> i;
voxel->Mips[i].PivotZ = voxel->Mips[0].PivotZ >> i;
}
for (i = 0; i < mip; ++i) for (i = 0; i < mip; ++i)
{ {
if (!CopyVoxelSlabs((kvxslab_t *)voxel->Mips[i].SlabData, slabs[i], voxel->Mips[i].OffsetX[voxel->Mips[i].SizeX])) if (!CopyVoxelSlabs((kvxslab_t *)voxel->Mips[i].SlabData, slabs[i], voxel->Mips[i].OffsetX[voxel->Mips[i].SizeX]))