OpenGL wall Y offset
Fixed wall textures breaking when Y offset of the wall was too high.
This commit is contained in:
parent
32de698f5e
commit
fc978c79bb
|
@ -1420,6 +1420,9 @@ static void HWR_StoreWallRange(double startfrac, double endfrac)
|
||||||
|
|
||||||
texturevpegtop += gr_sidedef->rowoffset;
|
texturevpegtop += gr_sidedef->rowoffset;
|
||||||
|
|
||||||
|
// This is so that it doesn't overflow and screw up the wall, it doesn't need to go higher than the texture's height anyway
|
||||||
|
texturevpegtop %= SHORT(textures[texturetranslation[gr_sidedef->toptexture]]->height)<<FRACBITS;
|
||||||
|
|
||||||
wallVerts[3].t = wallVerts[2].t = texturevpegtop * grTex->scaleY;
|
wallVerts[3].t = wallVerts[2].t = texturevpegtop * grTex->scaleY;
|
||||||
wallVerts[0].t = wallVerts[1].t = (texturevpegtop + worldtop - worldhigh) * grTex->scaleY;
|
wallVerts[0].t = wallVerts[1].t = (texturevpegtop + worldtop - worldhigh) * grTex->scaleY;
|
||||||
wallVerts[0].s = wallVerts[3].s = cliplow * grTex->scaleX;
|
wallVerts[0].s = wallVerts[3].s = cliplow * grTex->scaleX;
|
||||||
|
@ -1459,6 +1462,9 @@ static void HWR_StoreWallRange(double startfrac, double endfrac)
|
||||||
|
|
||||||
texturevpegbottom += gr_sidedef->rowoffset;
|
texturevpegbottom += gr_sidedef->rowoffset;
|
||||||
|
|
||||||
|
// This is so that it doesn't overflow and screw up the wall, it doesn't need to go higher than the texture's height anyway
|
||||||
|
texturevpegbottom %= SHORT(textures[texturetranslation[gr_sidedef->bottomtexture]]->height)<<FRACBITS;
|
||||||
|
|
||||||
wallVerts[3].t = wallVerts[2].t = texturevpegbottom * grTex->scaleY;
|
wallVerts[3].t = wallVerts[2].t = texturevpegbottom * grTex->scaleY;
|
||||||
wallVerts[0].t = wallVerts[1].t = (texturevpegbottom + worldlow - worldbottom) * grTex->scaleY;
|
wallVerts[0].t = wallVerts[1].t = (texturevpegbottom + worldlow - worldbottom) * grTex->scaleY;
|
||||||
wallVerts[0].s = wallVerts[3].s = cliplow * grTex->scaleX;
|
wallVerts[0].s = wallVerts[3].s = cliplow * grTex->scaleX;
|
||||||
|
|
Loading…
Reference in New Issue