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)