Add X, Y and Z offsets for VOXELDEF. Needed for voxelized weapons which would typically be very large and take up the majority of the 256x256x256 canvas, therefore making precise positioning of the models relative to the screen pretty much impossible without tweakable offsets.
This commit is contained in:
parent
13b9ffd6c8
commit
2e4bf697b8
4 changed files with 63 additions and 0 deletions
|
|
@ -616,6 +616,9 @@ void InitModels()
|
|||
smf.animationIDs[0] = -1;
|
||||
smf.xscale = smf.yscale = smf.zscale = VoxelDefs[i]->Scale;
|
||||
smf.angleoffset = VoxelDefs[i]->AngleOffset.Degrees();
|
||||
smf.xoffset = VoxelDefs[i]->xoffset;
|
||||
smf.yoffset = VoxelDefs[i]->yoffset;
|
||||
smf.zoffset = VoxelDefs[i]->zoffset;
|
||||
// this helps catching uninitialized data.
|
||||
assert(VoxelDefs[i]->PitchFromMomentum == true || VoxelDefs[i]->PitchFromMomentum == false);
|
||||
if (VoxelDefs[i]->PitchFromMomentum) smf.flags |= MDL_PITCHFROMMOMENTUM;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue