From dfd02fdeb381408e26fb3897f7da77c223b5f828 Mon Sep 17 00:00:00 2001 From: Alug Date: Fri, 11 Jul 2025 16:42:42 +0200 Subject: [PATCH] modulo maths lel --- src/r_data.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/r_data.c b/src/r_data.c index b0e3a18b6..ce0965e0d 100644 --- a/src/r_data.c +++ b/src/r_data.c @@ -485,9 +485,7 @@ UINT8 *R_GetColumn(fixed_t tex, INT32 col) // Odd width texture, cannot just mask. // Sometime gets colnum = -1 or = width, even without tiling. // Test LostCiv, Map 20, crates. - col = ( col < 0 ) ? - texwidth - (((-col - 1) % texwidth) + 1) - : col % texwidth; + col = ((col % texwidth) + texwidth) % texwidth; } if (!data)