mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2025-01-12 21:01:00 +00:00
Fix OpenGL completely missing the ability to alter FOF wall pegging by lower unpegged flag. Stupid OpenGL.
Sorry in advance Lat'!
This commit is contained in:
parent
650e0eafce
commit
d8a86a8d74
1 changed files with 21 additions and 14 deletions
|
@ -2182,27 +2182,34 @@ static void HWR_StoreWallRange(double startfrac, double endfrac)
|
||||||
}
|
}
|
||||||
else if (drawtextured)
|
else if (drawtextured)
|
||||||
{
|
{
|
||||||
#ifdef ESLOPE // P.S. this is better-organized than the old version
|
fixed_t texturevpeg;
|
||||||
fixed_t offs = sides[(newline ? newline : rover->master)->sidenum[0]].rowoffset;
|
|
||||||
grTex = HWR_GetTexture(texnum);
|
|
||||||
|
|
||||||
wallVerts[3].t = (*rover->topheight - h + offs) * grTex->scaleY;
|
|
||||||
wallVerts[2].t = (*rover->topheight - hS + offs) * grTex->scaleY;
|
|
||||||
wallVerts[0].t = (*rover->topheight - l + offs) * grTex->scaleY;
|
|
||||||
wallVerts[1].t = (*rover->topheight - lS + offs) * grTex->scaleY;
|
|
||||||
#else
|
|
||||||
grTex = HWR_GetTexture(texnum);
|
|
||||||
|
|
||||||
|
// Wow, how was this missing from OpenGL for so long?
|
||||||
|
// ...Oh well, anyway, Lower Unpegged now changes pegging of FOFs like in software
|
||||||
|
// -- Monster Iestyn 26/06/18
|
||||||
if (newline)
|
if (newline)
|
||||||
{
|
{
|
||||||
wallVerts[3].t = wallVerts[2].t = (*rover->topheight - h + sides[newline->sidenum[0]].rowoffset) * grTex->scaleY;
|
texturevpeg = sides[newline->sidenum[0]].rowoffset;
|
||||||
wallVerts[0].t = wallVerts[1].t = (h - l + (*rover->topheight - h + sides[newline->sidenum[0]].rowoffset)) * grTex->scaleY;
|
if (newline->flags & ML_DONTPEGBOTTOM)
|
||||||
|
texturevpeg -= *rover->topheight - *rover->bottomheight;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
wallVerts[3].t = wallVerts[2].t = (*rover->topheight - h + sides[rover->master->sidenum[0]].rowoffset) * grTex->scaleY;
|
texturevpeg = sides[rover->master->sidenum[0]].rowoffset;
|
||||||
wallVerts[0].t = wallVerts[1].t = (h - l + (*rover->topheight - h + sides[rover->master->sidenum[0]].rowoffset)) * grTex->scaleY;
|
if (gr_linedef->flags & ML_DONTPEGBOTTOM)
|
||||||
|
texturevpeg -= *rover->topheight - *rover->bottomheight;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
grTex = HWR_GetTexture(texnum);
|
||||||
|
|
||||||
|
#ifdef ESLOPE
|
||||||
|
wallVerts[3].t = (*rover->topheight - h + texturevpeg) * grTex->scaleY;
|
||||||
|
wallVerts[2].t = (*rover->topheight - hS + texturevpeg) * grTex->scaleY;
|
||||||
|
wallVerts[0].t = (*rover->topheight - l + texturevpeg) * grTex->scaleY;
|
||||||
|
wallVerts[1].t = (*rover->topheight - lS + texturevpeg) * grTex->scaleY;
|
||||||
|
#else
|
||||||
|
wallVerts[3].t = wallVerts[2].t = (*rover->topheight - h + texturevpeg) * grTex->scaleY;
|
||||||
|
wallVerts[0].t = wallVerts[1].t = (*rover->topheight - l + texturevpeg) * grTex->scaleY;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
wallVerts[0].s = wallVerts[3].s = cliplow * grTex->scaleX;
|
wallVerts[0].s = wallVerts[3].s = cliplow * grTex->scaleX;
|
||||||
|
|
Loading…
Reference in a new issue