From 0cea344dcef767f0133141e45a0e9115909a1a44 Mon Sep 17 00:00:00 2001 From: Magnus Norddahl Date: Sat, 11 Feb 2017 23:23:34 +0100 Subject: [PATCH] Fix voxel clipping bug --- src/swrenderer/things/r_visiblesprite.cpp | 2 +- src/swrenderer/things/r_voxel.cpp | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/swrenderer/things/r_visiblesprite.cpp b/src/swrenderer/things/r_visiblesprite.cpp index 809a21397..1f402de81 100644 --- a/src/swrenderer/things/r_visiblesprite.cpp +++ b/src/swrenderer/things/r_visiblesprite.cpp @@ -157,7 +157,7 @@ namespace swrenderer auto viewport = RenderViewport::Instance(); double scale = viewport->InvZtoScale * spr->idepth; - double hzb = DBL_MIN, hzt = DBL_MAX; + double hzb = -DBL_MAX, hzt = DBL_MAX; if (spr->IsVoxel() && spr->floorclip != 0) { diff --git a/src/swrenderer/things/r_voxel.cpp b/src/swrenderer/things/r_voxel.cpp index 62eb4b62f..ddb8d52c7 100644 --- a/src/swrenderer/things/r_voxel.cpp +++ b/src/swrenderer/things/r_voxel.cpp @@ -558,7 +558,6 @@ namespace swrenderer for (int x = xxl; x < xxr; ++x) { drawerargs.SetDest(lxt + x, z1); - drawerargs.SetSolidColor(100); drawerargs.SetCount(z2 - z1); drawerargs.DrawVoxelColumn(thread, yplc[xxl], yinc, col, zleng); }