From 049793f8f95ef2948a22fa1b280ee44872208bd2 Mon Sep 17 00:00:00 2001 From: myT Date: Thu, 26 May 2022 23:12:02 +0200 Subject: [PATCH] made some expression more legible as originally intended the code is equivalent since && has higher precedence than || in other words, I messed up but got it right by sheer luck --- code/renderer/tr_shade.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/renderer/tr_shade.cpp b/code/renderer/tr_shade.cpp index 008e6d4..2db40d5 100644 --- a/code/renderer/tr_shade.cpp +++ b/code/renderer/tr_shade.cpp @@ -68,8 +68,8 @@ static void RB_DrawDynamicLight() VectorSubtract(dl->transformed, tess.xyz[i], dist); const float dp = DotProduct(dist, tess.normal[i]); - if (cullType == CT_FRONT_SIDED && dp <= 0.0f || - cullType == CT_BACK_SIDED && dp >= 0.0f) { + if ((cullType == CT_FRONT_SIDED && dp <= 0.0f) || + (cullType == CT_BACK_SIDED && dp >= 0.0f)) { clipBits[i] = byte(-1); continue; }