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
|
|
@ -148,6 +148,9 @@ namespace swrenderer
|
|||
|
||||
vis->depth = (float)tz;
|
||||
vis->gpos = { (float)pos.X, (float)pos.Y, (float)pos.Z };
|
||||
vis->gpos.X += (float)voxel->xoffset;
|
||||
vis->gpos.Y += (float)voxel->yoffset;
|
||||
vis->gpos.Z += (float)voxel->zoffset;
|
||||
vis->gzb = (float)gzb; // [RH] use gzb, not thing->z
|
||||
vis->gzt = (float)gzt; // killough 3/27/98
|
||||
vis->deltax = float(pos.X - thread->Viewport->viewpoint.Pos.X);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue