mirror of
https://github.com/ZDoom/qzdoom.git
synced 2025-02-09 01:01:05 +00:00
- fixed: R_LoadVoxelDef did not fully initialize the voxel descriptor it creates.
This commit is contained in:
parent
96e98fc4a8
commit
5a52f61096
2 changed files with 6 additions and 3 deletions
|
@ -314,6 +314,7 @@ FVoxelDef *R_LoadVoxelDef(int lumpnum, int spin)
|
|||
else
|
||||
{
|
||||
FVoxelDef *voxdef = new FVoxelDef;
|
||||
*voxdef = {};
|
||||
voxdef->Voxel = vox;
|
||||
voxdef->Scale = 1.;
|
||||
voxdef->DroppedSpin = voxdef->PlacedSpin = spin;
|
||||
|
|
|
@ -425,9 +425,11 @@ void InitModels()
|
|||
smf.animationIDs[0] = -1;
|
||||
smf.xscale = smf.yscale = smf.zscale = VoxelDefs[i]->Scale;
|
||||
smf.angleoffset = VoxelDefs[i]->AngleOffset.Degrees();
|
||||
if (VoxelDefs[i]->PitchFromMomentum == true) smf.flags |= MDL_PITCHFROMMOMENTUM;
|
||||
if (VoxelDefs[i]->UseActorPitch == true) smf.flags |= MDL_USEACTORPITCH;
|
||||
if (VoxelDefs[i]->UseActorRoll == true) smf.flags |= MDL_USEACTORROLL;
|
||||
// this helps catching uninitialized data.
|
||||
assert(VoxelDefs[i]->PitchFromMomentum == true || VoxelDefs[i]->PitchFromMomentum == false);
|
||||
if (VoxelDefs[i]->PitchFromMomentum) smf.flags |= MDL_PITCHFROMMOMENTUM;
|
||||
if (VoxelDefs[i]->UseActorPitch) smf.flags |= MDL_USEACTORPITCH;
|
||||
if (VoxelDefs[i]->UseActorRoll) smf.flags |= MDL_USEACTORROLL;
|
||||
if (VoxelDefs[i]->PlacedSpin != 0)
|
||||
{
|
||||
smf.yrotate = 1.f;
|
||||
|
|
Loading…
Reference in a new issue