From 03e6c1ac20cb2280a00bd89793fd4d3acc36ecd5 Mon Sep 17 00:00:00 2001 From: drfrag Date: Sat, 2 Nov 2019 21:34:26 +0100 Subject: [PATCH] - Fixed stretching for 256 and 240 pixels tall skies in software. --- src/rendering/r_sky.cpp | 2 +- src/rendering/swrenderer/plane/r_skyplane.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/rendering/r_sky.cpp b/src/rendering/r_sky.cpp index 5d216a9d51..1c34c9c32d 100644 --- a/src/rendering/r_sky.cpp +++ b/src/rendering/r_sky.cpp @@ -105,7 +105,7 @@ void InitSkyMap(FLevelLocals *Level) skyheight = skytex1->GetDisplayHeight(); Level->skystretch = (r_skymode == 1 - && skyheight >= 128 && skyheight < 310 + && skyheight >= 128 && skyheight <= 256 && Level->IsFreelookAllowed() && !(Level->flags & LEVEL_FORCETILEDSKY)) ? 1 : 0; } diff --git a/src/rendering/swrenderer/plane/r_skyplane.cpp b/src/rendering/swrenderer/plane/r_skyplane.cpp index c4b7cb7829..7df7cc3813 100644 --- a/src/rendering/swrenderer/plane/r_skyplane.cpp +++ b/src/rendering/swrenderer/plane/r_skyplane.cpp @@ -83,7 +83,7 @@ namespace swrenderer FSoftwareTexture *sskytex2 = skytex2->GetSoftwareTexture(); skytexturemid = 0; int skyheight = skytex1->GetDisplayHeight(); - skyoffset = cl_oldfreelooklimit? 0 : skyheight >= 200? 110 : 138; + skyoffset = cl_oldfreelooklimit? 0 : skyheight == 256? 166 : skyheight >= 240? 150 : skyheight >= 200? 110 : 138; if (skyheight >= 128 && skyheight < 200) { skytexturemid = -28;