mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2025-02-20 18:42:17 +00:00
- fixed handling of wrapped midtextures to be actually useful when used in sky sectors.
# Conflicts: # src/hwrenderer/scene/hw_walls.cpp
This commit is contained in:
parent
be673459bd
commit
3e4f1ea813
1 changed files with 5 additions and 4 deletions
|
@ -776,6 +776,7 @@ void GLWall::DoMidTexture(seg_t * seg, bool drawfogboundary,
|
|||
float texturetop, texturebottom;
|
||||
bool wrap = (seg->linedef->flags&ML_WRAP_MIDTEX) || (seg->sidedef->Flags&WALLF_WRAP_MIDTEX);
|
||||
bool mirrory = false;
|
||||
float rowoffset = 0;
|
||||
|
||||
//
|
||||
//
|
||||
|
@ -794,7 +795,7 @@ void GLWall::DoMidTexture(seg_t * seg, bool drawfogboundary,
|
|||
tci.mRenderHeight = -tci.mRenderHeight;
|
||||
tci.mScale.Y = -tci.mScale.Y;
|
||||
}
|
||||
float rowoffset = tci.RowOffset(seg->sidedef->GetTextureYOffset(side_t::mid));
|
||||
rowoffset = tci.RowOffset(seg->sidedef->GetTextureYOffset(side_t::mid));
|
||||
if ((seg->linedef->flags & ML_DONTPEGBOTTOM) >0)
|
||||
{
|
||||
texturebottom = MAX(realfront->GetPlaneTexZ(sector_t::floor), realback->GetPlaneTexZ(sector_t::floor)) + rowoffset;
|
||||
|
@ -825,10 +826,10 @@ void GLWall::DoMidTexture(seg_t * seg, bool drawfogboundary,
|
|||
if (!tex || tex->UseType==ETextureType::Null)
|
||||
{
|
||||
if (front->GetTexture(sector_t::ceiling) == skyflatnum &&
|
||||
back->GetTexture(sector_t::ceiling) == skyflatnum)
|
||||
back->GetTexture(sector_t::ceiling) == skyflatnum && !wrap)
|
||||
{
|
||||
// intra-sky lines do not clip the texture at all if there's no upper texture
|
||||
topleft = topright = wrap ? 1e16f : texturetop;
|
||||
// intra-sky lines do not clip the texture at all if there's no upper texture.
|
||||
topleft = topright = texturetop;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue