From 348c384bb63ddbaf295d73703574187f804450d6 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Fri, 1 Apr 2016 18:07:18 +0200 Subject: [PATCH] - fixed scaling of skies with unusual dimensions. --- src/gl/scene/gl_clipper.cpp | 2 +- src/gl/scene/gl_skydome.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gl/scene/gl_clipper.cpp b/src/gl/scene/gl_clipper.cpp index c6f8d9019..388048181 100644 --- a/src/gl/scene/gl_clipper.cpp +++ b/src/gl/scene/gl_clipper.cpp @@ -379,7 +379,7 @@ angle_t Clipper::AngleToPseudo(angle_t ang) // // ! Returns the pseudoangle between the line p1 to (infinity, p1.y) and the // line from p1 to p2. The pseudoangle has the property that the ordering of -// points by true angle anround p1 and ordering of points by pseudoangle are the +// points by true angle around p1 and ordering of points by pseudoangle are the // same. // // For clipping exact angles are not needed. Only the ordering matters. diff --git a/src/gl/scene/gl_skydome.cpp b/src/gl/scene/gl_skydome.cpp index 59b0f634d..37950ae72 100644 --- a/src/gl/scene/gl_skydome.cpp +++ b/src/gl/scene/gl_skydome.cpp @@ -276,7 +276,7 @@ void RenderDome(FMaterial * tex, float x_offset, float y_offset, bool mirror, in gl_RenderState.mModelMatrix.loadIdentity(); gl_RenderState.mModelMatrix.rotate(-180.0f+x_offset, 0.f, 1.f, 0.f); - float xscale = 1024.f / float(texw); + float xscale = texw < 1024.f ? floor(1024.f / float(texw)) : 1.f; float yscale = 1.f; if (texh < 128) {