- Fixed: Texture positioning for one-sided lines marked ML_DONTPEGBOTTOM was wrong.

SVN r3707 (trunk)
This commit is contained in:
Randy Heit 2012-06-22 04:07:53 +00:00
parent 70c11f7568
commit 41f2337e7a
1 changed files with 4 additions and 4 deletions

View File

@ -1953,11 +1953,11 @@ void R_NewWall (bool needlights)
yrepeat = FixedMul(midtexture->yScale, rw_midtexturescaley);
if (linedef->flags & ML_DONTPEGBOTTOM)
{ // 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
{ // 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)
{
rowoffset += midtexture->GetHeight() << FRACBITS;
@ -1965,13 +1965,13 @@ void R_NewWall (bool needlights)
}
if (midtexture->bWorldPanning)
{
rw_midtexturemid = MulScale16(rw_midtexturemid - viewz + rowoffset, yrepeat);
rw_midtexturemid = MulScale16(rowoffset, yrepeat);
}
else
{
// rowoffset is added outside the multiply so that it positions the texture
// by texels instead of world units.
rw_midtexturemid = MulScale16(rw_midtexturemid - viewz, yrepeat) + rowoffset;
rw_midtexturemid += rowoffset;
}
}
}