- fixed voxel rendering.

No, that 'while' was even pointless in Polymost, much more here where it runs within another loop.
This commit is contained in:
Christoph Oelckers 2021-04-04 13:45:43 +02:00
parent d76c2ccc34
commit 1201cc71ef

View file

@ -289,34 +289,31 @@ void HWDrawInfo::DispatchSprites()
setgotpic(tilenum); setgotpic(tilenum);
while (!(spriteext[spritenum].flags & SPREXT_NOTMD)) if (!(spriteext[spritenum].flags & SPREXT_NOTMD))
{ {
int pt = Ptile2tile(tspr->picnum, tspr->pal); int pt = Ptile2tile(tspr->picnum, tspr->pal);
if (hw_models && tile2model[pt].modelid >= 0 && tile2model[pt].framenum >= 0) if (hw_models && tile2model[pt].modelid >= 0 && tile2model[pt].framenum >= 0)
{ {
//HWSprite hwsprite; //HWSprite hwsprite;
//if (hwsprite.ProcessModel(pt, tspr)) return; //if (hwsprite.ProcessModel(pt, tspr)) continue;
break;
} }
if (r_voxels) if (r_voxels)
{ {
if ((tspr->cstat & CSTAT_SPRITE_ALIGNMENT) != CSTAT_SPRITE_ALIGNMENT_SLAB && tiletovox[tspr->picnum] >= 0 && voxmodels[tiletovox[tspr->picnum]]) if ((tspr->cstat & CSTAT_SPRITE_ALIGNMENT) != CSTAT_SPRITE_ALIGNMENT_SLAB && tiletovox[tspr->picnum] >= 0 && voxmodels[tiletovox[tspr->picnum]])
{ {
HWSprite hwsprite; HWSprite hwsprite;
int num = tiletovox[tspr->picnum]; int num = tiletovox[tspr->picnum];
if (hwsprite.ProcessVoxel(this, voxmodels[tiletovox[tspr->picnum]], tspr, &sector[tspr->sectnum], voxrotate[num >> 3] & (1 << (num & 7)))) return; if (hwsprite.ProcessVoxel(this, voxmodels[tiletovox[tspr->picnum]], tspr, &sector[tspr->sectnum], voxrotate[num >> 3] & (1 << (num & 7))))
break; continue;
} }
else if ((tspr->cstat & CSTAT_SPRITE_ALIGNMENT) == CSTAT_SPRITE_ALIGNMENT_SLAB && tspr->picnum < MAXVOXELS && voxmodels[tspr->picnum]) else if ((tspr->cstat & CSTAT_SPRITE_ALIGNMENT) == CSTAT_SPRITE_ALIGNMENT_SLAB && tspr->picnum < MAXVOXELS && voxmodels[tspr->picnum])
{ {
HWSprite hwsprite; HWSprite hwsprite;
int num = tspr->picnum; int num = tspr->picnum;
hwsprite.ProcessVoxel(this, voxmodels[tspr->picnum], tspr, &sector[tspr->sectnum], voxrotate[num >> 3] & (1 << (num & 7))); hwsprite.ProcessVoxel(this, voxmodels[tspr->picnum], tspr, &sector[tspr->sectnum], voxrotate[num >> 3] & (1 << (num & 7)));
break; continue;
} }
} }
break;
} }
if (spriteext[spritenum].flags & SPREXT_AWAY1) if (spriteext[spritenum].flags & SPREXT_AWAY1)