diff --git a/src/r_segs.cpp b/src/r_segs.cpp index ac98b78e1..b3fb1db0f 100644 --- a/src/r_segs.cpp +++ b/src/r_segs.cpp @@ -2049,11 +2049,17 @@ void R_StoreWallRange(INT32 start, INT32 stop) ceilingbackslide = FixedMul(backsector->c_slope->zdelta, FINECOSINE((lineangle-backsector->c_slope->xydirection)>>ANGLETOFINESHIFT)); } + auto get_flat_tex = [](INT32 texnum) + { + texnum = R_GetTextureNum(texnum); + return textures[texnum]->holes ? 0 : texnum; // R_DrawWallColumn cannot render holey textures + }; + if (!backsector) { fixed_t texheight; // single sided line - midtexture = R_GetTextureNum(sidedef->midtexture); + midtexture = get_flat_tex(sidedef->midtexture); midbrightmapped = R_TextureHasBrightmap(midtexture); midremap = wantremap && R_TextureCanRemap(sidedef->midtexture); texheight = textureheight[midtexture]; @@ -2246,7 +2252,7 @@ void R_StoreWallRange(INT32 start, INT32 stop) { fixed_t texheight; // top texture - toptexture = R_GetTextureNum(sidedef->toptexture); + toptexture = get_flat_tex(sidedef->toptexture); topbrightmapped = R_TextureHasBrightmap(toptexture); topremap = wantremap && R_TextureCanRemap(sidedef->toptexture); texheight = textureheight[toptexture]; @@ -2276,7 +2282,7 @@ void R_StoreWallRange(INT32 start, INT32 stop) && (worldlow > worldbottom || worldlowslope > worldbottomslope)) // Only if VISIBLE!!! { // bottom texture - bottomtexture = R_GetTextureNum(sidedef->bottomtexture); + bottomtexture = get_flat_tex(sidedef->bottomtexture); bottombrightmapped = R_TextureHasBrightmap(bottomtexture); bottomremap = wantremap && R_TextureCanRemap(sidedef->bottomtexture);