From 16d813859ff6522665a56dca93c3d902be91014e Mon Sep 17 00:00:00 2001 From: Ozkan Sezer Date: Thu, 2 Jun 2022 14:33:10 +0300 Subject: [PATCH] R_DrawSequentialPoly: don't use function calls from CLAMP() macro. --- Quake/r_brush.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Quake/r_brush.c b/Quake/r_brush.c index 70cb9e9b..75d5e28a 100644 --- a/Quake/r_brush.c +++ b/Quake/r_brush.c @@ -234,8 +234,11 @@ void R_DrawSequentialPoly (msurface_t *s) if (s->flags & SURF_DRAWTURB) { if (currententity->alpha == ENTALPHA_DEFAULT) - entalpha = CLAMP(0.0, GL_WaterAlphaForSurface(s), 1.0); - + { + entalpha = GL_WaterAlphaForSurface(s); + if (entalpha > 1.0f) entalpha = 1.0f; + else if (entalpha < 0.0f) entalpha = 0.0f; + } if (entalpha < 1) { glDepthMask(GL_FALSE);