mirror of
https://github.com/ZDoom/qzdoom-gpl.git
synced 2024-12-03 17:02:12 +00:00
- fixed: positioning of camera textures on 2-sided walls was not correct.
This commit is contained in:
parent
71fc4c295f
commit
141065c3d5
1 changed files with 18 additions and 6 deletions
|
@ -678,6 +678,7 @@ void GLWall::DoMidTexture(seg_t * seg, bool drawfogboundary,
|
||||||
GLSeg glsave=glseg;
|
GLSeg glsave=glseg;
|
||||||
fixed_t texturetop, texturebottom;
|
fixed_t texturetop, texturebottom;
|
||||||
bool wrap = (seg->linedef->flags&ML_WRAP_MIDTEX) || (seg->sidedef->Flags&WALLF_WRAP_MIDTEX);
|
bool wrap = (seg->linedef->flags&ML_WRAP_MIDTEX) || (seg->sidedef->Flags&WALLF_WRAP_MIDTEX);
|
||||||
|
bool mirrory = false;
|
||||||
|
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
|
@ -690,6 +691,12 @@ void GLWall::DoMidTexture(seg_t * seg, bool drawfogboundary,
|
||||||
// At this point slopes don't matter because they don't affect the texture's z-position
|
// At this point slopes don't matter because they don't affect the texture's z-position
|
||||||
|
|
||||||
gltexture->GetTexCoordInfo(&tci, seg->sidedef->GetTextureXScale(side_t::mid), seg->sidedef->GetTextureYScale(side_t::mid));
|
gltexture->GetTexCoordInfo(&tci, seg->sidedef->GetTextureXScale(side_t::mid), seg->sidedef->GetTextureYScale(side_t::mid));
|
||||||
|
if (tci.mRenderHeight < 0)
|
||||||
|
{
|
||||||
|
mirrory = true;
|
||||||
|
tci.mRenderHeight = -tci.mRenderHeight;
|
||||||
|
tci.mScaleY = -tci.mScaleY;
|
||||||
|
}
|
||||||
fixed_t rowoffset = tci.RowOffset(seg->sidedef->GetTextureYOffset(side_t::mid));
|
fixed_t rowoffset = tci.RowOffset(seg->sidedef->GetTextureYOffset(side_t::mid));
|
||||||
if ((seg->linedef->flags & ML_DONTPEGBOTTOM) >0)
|
if ((seg->linedef->flags & ML_DONTPEGBOTTOM) >0)
|
||||||
{
|
{
|
||||||
|
@ -840,6 +847,11 @@ void GLWall::DoMidTexture(seg_t * seg, bool drawfogboundary,
|
||||||
flags|=GLT_CLAMPY;
|
flags|=GLT_CLAMPY;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (mirrory)
|
||||||
|
{
|
||||||
|
tci.mRenderHeight = -tci.mRenderHeight;
|
||||||
|
tci.mScaleY = -tci.mScaleY;
|
||||||
|
}
|
||||||
SetWallCoordinates(seg, &tci, FIXED2FLOAT(texturetop), topleft, topright, bottomleft, bottomright, t_ofs);
|
SetWallCoordinates(seg, &tci, FIXED2FLOAT(texturetop), topleft, topright, bottomleft, bottomright, t_ofs);
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
Loading…
Reference in a new issue