From 1201cc71ef54c499e7d9a52ef60e4d35c870acf8 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 4 Apr 2021 13:45:43 +0200 Subject: [PATCH] - fixed voxel rendering. No, that 'while' was even pointless in Polymost, much more here where it runs within another loop. --- source/core/rendering/scene/hw_drawinfo.cpp | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/source/core/rendering/scene/hw_drawinfo.cpp b/source/core/rendering/scene/hw_drawinfo.cpp index 4377fac7e..343c143ae 100644 --- a/source/core/rendering/scene/hw_drawinfo.cpp +++ b/source/core/rendering/scene/hw_drawinfo.cpp @@ -289,34 +289,31 @@ void HWDrawInfo::DispatchSprites() setgotpic(tilenum); - while (!(spriteext[spritenum].flags & SPREXT_NOTMD)) + if (!(spriteext[spritenum].flags & SPREXT_NOTMD)) { int pt = Ptile2tile(tspr->picnum, tspr->pal); if (hw_models && tile2model[pt].modelid >= 0 && tile2model[pt].framenum >= 0) { //HWSprite hwsprite; - //if (hwsprite.ProcessModel(pt, tspr)) return; - break; + //if (hwsprite.ProcessModel(pt, tspr)) continue; } - if (r_voxels) { if ((tspr->cstat & CSTAT_SPRITE_ALIGNMENT) != CSTAT_SPRITE_ALIGNMENT_SLAB && tiletovox[tspr->picnum] >= 0 && voxmodels[tiletovox[tspr->picnum]]) { HWSprite hwsprite; int num = tiletovox[tspr->picnum]; - if (hwsprite.ProcessVoxel(this, voxmodels[tiletovox[tspr->picnum]], tspr, §or[tspr->sectnum], voxrotate[num >> 3] & (1 << (num & 7)))) return; - break; + if (hwsprite.ProcessVoxel(this, voxmodels[tiletovox[tspr->picnum]], tspr, §or[tspr->sectnum], voxrotate[num >> 3] & (1 << (num & 7)))) + continue; } else if ((tspr->cstat & CSTAT_SPRITE_ALIGNMENT) == CSTAT_SPRITE_ALIGNMENT_SLAB && tspr->picnum < MAXVOXELS && voxmodels[tspr->picnum]) { HWSprite hwsprite; int num = tspr->picnum; hwsprite.ProcessVoxel(this, voxmodels[tspr->picnum], tspr, §or[tspr->sectnum], voxrotate[num >> 3] & (1 << (num & 7))); - break; + continue; } } - break; } if (spriteext[spritenum].flags & SPREXT_AWAY1)