From dd4a9ae8909df63cc538e9f701728dd489ec000f Mon Sep 17 00:00:00 2001 From: haya <126386046+hayaunderscore@users.noreply.github.com> Date: Fri, 8 Sep 2023 10:24:37 +0800 Subject: [PATCH] i may be stupid --- src/hardware/r_opengl/r_opengl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hardware/r_opengl/r_opengl.c b/src/hardware/r_opengl/r_opengl.c index 8f740dd1b..b0c6ec8f6 100644 --- a/src/hardware/r_opengl/r_opengl.c +++ b/src/hardware/r_opengl/r_opengl.c @@ -1875,7 +1875,7 @@ static int comparePolygons(const void *p1, const void *p2) // make skywalls and horizon lines first in order if (poly1->polyFlags & PF_NoTexture || poly1->horizonSpecial) shader1 = -1; - if (poly2->polyFlags & PF_NoTexture || poly1->horizonSpecial) + if (poly2->polyFlags & PF_NoTexture || poly2->horizonSpecial) shader2 = -1; diff = shader1 - shader2; if (diff != 0) return diff; @@ -1918,7 +1918,7 @@ static int comparePolygonsNoShaders(const void *p1, const void *p2) GLuint texNum2 = poly2->texNum; if (poly1->polyFlags & PF_NoTexture || poly1->horizonSpecial) texNum1 = 0; - if (poly2->polyFlags & PF_NoTexture || poly1->horizonSpecial) + if (poly2->polyFlags & PF_NoTexture || poly2->horizonSpecial) texNum2 = 0; diff = texNum1 - texNum2; if (diff != 0) return diff;