From 06cd9a54b064474e2a47350ae47c93b090852c93 Mon Sep 17 00:00:00 2001 From: Loobinex Date: Sat, 26 Oct 2024 19:20:51 +0200 Subject: [PATCH] limit to 32 --- src/engine_render.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/engine_render.c b/src/engine_render.c index 8f36737128..844c5ebab3 100644 --- a/src/engine_render.c +++ b/src/engine_render.c @@ -4028,7 +4028,7 @@ unsigned short engine_remap_texture_blocks(long stl_x, long stl_y, unsigned shor { long slb_x = subtile_slab(stl_x); long slb_y = subtile_slab(stl_y); - return tex_id + (gameadd.slab_ext_data[get_slab_number(slb_x,slb_y)]) * TEXTURE_BLOCKS_COUNT; + return tex_id + (gameadd.slab_ext_data[get_slab_number(slb_x,slb_y)] & 0x1F) * TEXTURE_BLOCKS_COUNT; } static void do_a_plane_of_engine_columns_perspective(long stl_x, long stl_y, long plane_start, long plane_end)