- factor in angoff when placing sprites.

This commit is contained in:
Christoph Oelckers 2021-04-25 11:58:03 +02:00
parent 8c379f7a44
commit aa6bd8ffcc

View file

@ -443,6 +443,7 @@ void HWSprite::Process(HWDrawInfo* di, spritetype* spr, sectortype* sector, int
bool HWSprite::ProcessVoxel(HWDrawInfo* di, voxmodel_t* vox, spritetype* spr, sectortype* sector, bool rotate)
{
sprite = spr;
auto sprext = &spriteext[spr->owner];
texture = nullptr;
modelframe = -1;
@ -453,7 +454,7 @@ bool HWSprite::ProcessVoxel(HWDrawInfo* di, voxmodel_t* vox, spritetype* spr, se
visibility = sectorVisibility(sector);
voxel = vox;
auto ang = spr->ang;
auto ang = spr->ang + sprext->angoff;
if ((spr->cstat & CSTAT_SPRITE_MDLROTATE) || rotate)
{
int myclock = (PlayClock << 3) + MulScale(4 << 3, (int)di->Viewpoint.TicFrac, 16);
@ -465,7 +466,6 @@ bool HWSprite::ProcessVoxel(HWDrawInfo* di, voxmodel_t* vox, spritetype* spr, se
SetSpriteTranslucency(spr, alpha, RenderStyle);
auto sprext = &spriteext[spr->owner];
FVector3 scalevec = { voxel->scale, voxel->scale, voxel->scale };
FVector3 translatevec = { 0, 0, voxel->zadd * voxel->scale };