mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-23 20:43:15 +00:00
- Fixed: Texture positioning for one-sided lines marked ML_DONTPEGBOTTOM was wrong.
SVN r3707 (trunk)
This commit is contained in:
parent
70c11f7568
commit
41f2337e7a
1 changed files with 4 additions and 4 deletions
|
@ -1953,11 +1953,11 @@ void R_NewWall (bool needlights)
|
||||||
yrepeat = FixedMul(midtexture->yScale, rw_midtexturescaley);
|
yrepeat = FixedMul(midtexture->yScale, rw_midtexturescaley);
|
||||||
if (linedef->flags & ML_DONTPEGBOTTOM)
|
if (linedef->flags & ML_DONTPEGBOTTOM)
|
||||||
{ // bottom of texture at bottom
|
{ // bottom of texture at bottom
|
||||||
rw_midtexturemid = frontsector->GetPlaneTexZ(sector_t::floor) + (midtexture->GetHeight() << FRACBITS);
|
rw_midtexturemid = MulScale16(frontsector->GetPlaneTexZ(sector_t::floor) - viewz, yrepeat) + (midtexture->GetHeight() << FRACBITS);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{ // top of texture at top
|
{ // top of texture at top
|
||||||
rw_midtexturemid = frontsector->GetPlaneTexZ(sector_t::ceiling);
|
rw_midtexturemid = MulScale16(frontsector->GetPlaneTexZ(sector_t::ceiling) - viewz, yrepeat);
|
||||||
if (rowoffset < 0 && midtexture != NULL)
|
if (rowoffset < 0 && midtexture != NULL)
|
||||||
{
|
{
|
||||||
rowoffset += midtexture->GetHeight() << FRACBITS;
|
rowoffset += midtexture->GetHeight() << FRACBITS;
|
||||||
|
@ -1965,13 +1965,13 @@ void R_NewWall (bool needlights)
|
||||||
}
|
}
|
||||||
if (midtexture->bWorldPanning)
|
if (midtexture->bWorldPanning)
|
||||||
{
|
{
|
||||||
rw_midtexturemid = MulScale16(rw_midtexturemid - viewz + rowoffset, yrepeat);
|
rw_midtexturemid = MulScale16(rowoffset, yrepeat);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// rowoffset is added outside the multiply so that it positions the texture
|
// rowoffset is added outside the multiply so that it positions the texture
|
||||||
// by texels instead of world units.
|
// by texels instead of world units.
|
||||||
rw_midtexturemid = MulScale16(rw_midtexturemid - viewz, yrepeat) + rowoffset;
|
rw_midtexturemid += rowoffset;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue