diff --git a/src/hardware/hw_bsp.c b/src/hardware/hw_bsp.c index 3d7a3dda5..6982e371b 100644 --- a/src/hardware/hw_bsp.c +++ b/src/hardware/hw_bsp.c @@ -936,23 +936,6 @@ static void AdjustSegs(void) pv->y = FIXED_TO_FLOAT(lseg->v2->y); lseg->pv2 = pv; } - - // recompute length - { - float x,y; - - const polyvertex_t *pv1 = (polyvertex_t *)lseg->pv1; - const polyvertex_t *pv2 = (polyvertex_t *)lseg->pv2; - - x = pv2->x - pv1->x + 0.5f; - y = pv2->y - pv1->y + 0.5f; - - lseg->flength = hypotf(x, y); - - // BP: debug see this kind of segs - //if (nearv2 > NEARDIST*NEARDIST || nearv1 > NEARDIST*NEARDIST) - // lseg->length = 1; - } } } } diff --git a/src/hardware/hw_main.cpp b/src/hardware/hw_main.cpp index fc4a55dc9..84bb7d527 100644 --- a/src/hardware/hw_main.cpp +++ b/src/hardware/hw_main.cpp @@ -1419,7 +1419,7 @@ void HWR_ProcessSeg(void) // Sort of like GLWall::Process in GZDoom // x offset the texture const fixed_t texturehpeg = gl_sidedef->textureoffset + gl_curline->offset; const float cliplow = (float)texturehpeg; - const float cliphigh = (float)(texturehpeg + (gl_curline->flength*FRACUNIT)); + const float cliphigh = (float)(texturehpeg + gl_curline->length); FUINT lightnum = gl_frontsector->lightlevel; extracolormap_t *colormap = gl_frontsector->extra_colormap; diff --git a/src/p_setup.c b/src/p_setup.c index ccae26eea..f0e48fbdd 100644 --- a/src/p_setup.c +++ b/src/p_setup.c @@ -565,10 +565,6 @@ static void P_LoadSegs(UINT8 *data) li->v2 = &vertexes[SHORT(ml->v2)]; li->length = P_SegLength(li); -#ifdef HWRENDER - if (rendermode == render_opengl) - li->flength = P_SegLengthFloat(li); -#endif li->angle = (SHORT(ml->angle))<offset = (SHORT(ml->offset))<linedef); diff --git a/src/r_defs.h b/src/r_defs.h index abd3b6bd7..043c9ba4a 100644 --- a/src/r_defs.h +++ b/src/r_defs.h @@ -548,7 +548,6 @@ typedef struct seg_s // new pointers so that AdjustSegs doesn't mess with v1/v2 polyvertex_t *pv1; // polyvertex_t polyvertex_t *pv2; // polyvertex_t - float flength; // length of the seg, used by hardware renderer #endif polyobj_t *polyseg;