mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-11-14 17:00:39 +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)
|
||||
{
|
||||
#ifdef ESLOPE // P.S. this is better-organized than the old version
|
||||
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);
|
||||
fixed_t texturevpeg;
|
||||
|
||||
// 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)
|
||||
{
|
||||
wallVerts[3].t = wallVerts[2].t = (*rover->topheight - h + sides[newline->sidenum[0]].rowoffset) * grTex->scaleY;
|
||||
wallVerts[0].t = wallVerts[1].t = (h - l + (*rover->topheight - h + sides[newline->sidenum[0]].rowoffset)) * grTex->scaleY;
|
||||
texturevpeg = sides[newline->sidenum[0]].rowoffset;
|
||||
if (newline->flags & ML_DONTPEGBOTTOM)
|
||||
texturevpeg -= *rover->topheight - *rover->bottomheight;
|
||||
}
|
||||
else
|
||||
{
|
||||
wallVerts[3].t = wallVerts[2].t = (*rover->topheight - h + sides[rover->master->sidenum[0]].rowoffset) * grTex->scaleY;
|
||||
wallVerts[0].t = wallVerts[1].t = (h - l + (*rover->topheight - h + sides[rover->master->sidenum[0]].rowoffset)) * grTex->scaleY;
|
||||
texturevpeg = sides[rover->master->sidenum[0]].rowoffset;
|
||||
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
|
||||
|
||||
wallVerts[0].s = wallVerts[3].s = cliplow * grTex->scaleX;
|
||||
|
|
Loading…
Reference in a new issue