Voxels did not have an animationID causing a crash

- Needed to assign -1 to the first index of animations for voxels or a crash occurs
This commit is contained in:
Shiny Metagross 2022-09-15 09:57:06 -07:00 committed by Christoph Oelckers
parent 7972afc350
commit 7722784de6

View file

@ -421,6 +421,8 @@ void InitModels()
smf.modelIDs[0] = VoxelDefs[i]->Voxel->VoxelIndex;
smf.skinIDs.Alloc(1);
smf.skinIDs[0] = md->GetPaletteTexture();
smf.animationIDs.Alloc(1);
smf.animationIDs[0] = -1;
smf.xscale = smf.yscale = smf.zscale = VoxelDefs[i]->Scale;
smf.angleoffset = VoxelDefs[i]->AngleOffset.Degrees();
if (VoxelDefs[i]->PitchFromMomentum) smf.flags |= MDL_PITCHFROMMOMENTUM;