From 6ab58e56ad6fc356ebf0bfaf15cfd98b54796ca9 Mon Sep 17 00:00:00 2001 From: Magnus Norddahl Date: Thu, 8 Mar 2018 04:25:27 +0100 Subject: [PATCH] - fix simplify code slightly --- src/swrenderer/scene/r_translucent_pass.cpp | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/src/swrenderer/scene/r_translucent_pass.cpp b/src/swrenderer/scene/r_translucent_pass.cpp index d56fde2fd..244bb4392 100644 --- a/src/swrenderer/scene/r_translucent_pass.cpp +++ b/src/swrenderer/scene/r_translucent_pass.cpp @@ -195,14 +195,10 @@ namespace swrenderer Fake3DTranslucent clip3DFloor; if (hl->next) { - clip3DFloor.clipBottom = true; clip3DFloor.clipTop = true; clip3DFloor.sclipTop = hl->next->height; } - else - { - clip3DFloor.clipBottom = true; - } + clip3DFloor.clipBottom = true; clip3DFloor.sclipBottom = hl->height; DrawMaskedSingle(true, clip3DFloor); Thread->PlaneList->RenderHeight(hl->height); @@ -212,27 +208,22 @@ namespace swrenderer { Fake3DTranslucent clip3DFloor; clip3DFloor.clipTop = true; - clip3DFloor.down2Up = true; clip3DFloor.sclipTop = clip3d->height_top->height; + clip3DFloor.down2Up = true; DrawMaskedSingle(true, clip3DFloor); } - for (HeightLevel *hl = clip3d->height_top; hl != nullptr && hl->height < Thread->Viewport->viewpoint.Pos.Z; hl = hl->next) { Thread->PlaneList->RenderHeight(hl->height); Fake3DTranslucent clip3DFloor; if (hl->next) { - clip3DFloor.clipBottom = true; clip3DFloor.clipTop = true; - clip3DFloor.down2Up = true; clip3DFloor.sclipTop = hl->next->height; } - else - { - clip3DFloor.clipBottom = true; - } + clip3DFloor.clipBottom = true; clip3DFloor.sclipBottom = hl->height; + clip3DFloor.down2Up = true; DrawMaskedSingle(true, clip3DFloor); } clip3d->DeleteHeights();