diff --git a/docs/rh-log.txt b/docs/rh-log.txt index 19826e030..dc8887621 100644 --- a/docs/rh-log.txt +++ b/docs/rh-log.txt @@ -1,3 +1,8 @@ +November 14, 2009 (Changes by Graf Zahl) +- added a r_scaletallskies CVAR so that sky positioning can be checked + more easily. +- fixed: Skies with a height of exactly 200 pixels should not be stretched. + November 13, 2009 - More sky changes: Textures taller than 200 pixels but shorter than 241 are scaled to the height of a 200 pixel tall sky. Skies taller than 240 diff --git a/src/r_sky.cpp b/src/r_sky.cpp index 83231fe70..1c8b520d7 100644 --- a/src/r_sky.cpp +++ b/src/r_sky.cpp @@ -64,6 +64,10 @@ extern fixed_t freelookviewheight; // Called whenever the view size changes. // //========================================================================== +CUSTOM_CVAR(Bool, r_scaletallskies, true, CVAR_ARCHIVE) +{ + R_InitSkyMap(); +} void R_InitSkyMap () { @@ -109,10 +113,14 @@ void R_InitSkyMap () && !(level.flags & LEVEL_FORCENOSKYSTRETCH)) ? 1 : 0; skytexturemid = -28*FRACUNIT; } - else if (skyheight > 240) + else if (r_scaletallskies && skyheight > 240) { skytexturemid = (240 - skyheight) << FRACBITS; } + else if (!r_scaletallskies && skyheight > 200) + { + skytexturemid = (200 - skyheight) << FRACBITS; + } if (viewwidth != 0 && viewheight != 0) { @@ -124,13 +132,13 @@ void R_InitSkyMap () skyscale = Scale (skyscale, 2048, FieldOfView); } - if (skyheight > 200) + if (r_scaletallskies && skyheight > 200) { int sheight = MIN(skyheight, 240); skyscale = Scale(skyscale, 200, sheight); skyiscale = Scale(skyiscale, sheight, 200); } - else if (skystretch) + else if (skyheight < 200 && skystretch) { skyscale = Scale(skyscale, SKYSTRETCH_HEIGHT, skyheight); skyiscale = Scale(skyiscale, skyheight, SKYSTRETCH_HEIGHT);