diff --git a/src/r_segs.c b/src/r_segs.c index 918beb873..c4b46e7f9 100644 --- a/src/r_segs.c +++ b/src/r_segs.c @@ -1614,12 +1614,6 @@ static INT64 R_CalcSegDist(seg_t* seg, INT64 x2, INT64 y2) } } -static inline INT32 get_flat_tex (INT32 texnum) -{ - texnum = R_GetTextureNum(texnum); - return textures[texnum]->holes ? 0 : texnum; // R_DrawWallColumn cannot render holey textures -} - // // R_StoreWallRange // A wall segment will be drawn @@ -1875,7 +1869,7 @@ void R_StoreWallRange(INT32 start, INT32 stop) { fixed_t texheight; // single sided line - midtexture = get_flat_tex(sidedef->midtexture); + midtexture = R_GetTextureNum(sidedef->midtexture); texheight = textureheight[midtexture]; // a single sided line is terminal, so it must mark ends markfloor = markceiling = true; @@ -2052,15 +2046,15 @@ void R_StoreWallRange(INT32 start, INT32 stop) { // Special case... use offsets from 2nd side but only if it has a texture. side_t *def = &sides[linedef->sidenum[1]]; - toptexture = get_flat_tex(def->toptexture); + toptexture = R_GetTextureNum(def->toptexture); if (!toptexture) //Second side has no texture, use the first side's instead. - toptexture = get_flat_tex(sidedef->toptexture); + toptexture = R_GetTextureNum(sidedef->toptexture); texheight = textureheight[toptexture]; } else { - toptexture = get_flat_tex(sidedef->toptexture); + toptexture = R_GetTextureNum(sidedef->toptexture); texheight = textureheight[toptexture]; } if (!(linedef->flags & ML_EFFECT1)) { // Ignore slopes for lower/upper textures unless flag is checked @@ -2085,7 +2079,7 @@ void R_StoreWallRange(INT32 start, INT32 stop) if (worldlow > worldbottom || worldlowslope > worldbottomslope) // Only if VISIBLE!!! { // bottom texture - bottomtexture = get_flat_tex(sidedef->bottomtexture); + bottomtexture = R_GetTextureNum(sidedef->bottomtexture); if (!(linedef->flags & ML_EFFECT1)) { // Ignore slopes for lower/upper textures unless flag is checked if (linedef->flags & ML_DONTPEGBOTTOM)