remove floatlenght from seg_t

this will get converted to fixedpoint anyways and is only used in ONE function at all to determine texture x offsets in gl
yes this does get readjusted in adjustsegs if our glsegs differ, but this should be so marginal so save us the work at mapload
gotta test and see if i can ever see a difference
This commit is contained in:
Alug committed 2025-09-16 02:10:19 +02:00
1 parent abb4aa7af6
commit 3e38faed2e
4 files changed
+1 -23

No files matched your search

-17
View File
@@ -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;
}
}
}
}
+1 -1
View File
@@ -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;
-4
View File
@@ -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))<<FRACBITS;
li->offset = (SHORT(ml->offset))<<FRACBITS;
rawlinedef = SHORT(ml->linedef);
-1
View File
@@ -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;