Use the correct sidedef's middle scaling when drawing 3D floors.

This wants `curline->sidedef`, which is the 3D sidedef currently being
drawn.  `sidedef` appears to be the last regular sidedef that happened
to be drawn?  The perils of globals.
This commit is contained in:
Eevee (Alex Munroe) 2015-06-06 18:08:18 -07:00
parent 662345adb8
commit 8fa9aa2627

View file

@ -557,8 +557,8 @@ void R_RenderFakeWall(drawseg_t *ds, int x1, int x2, F3DFloor *rover)
MaskedSWall = (fixed_t *)(openings + ds->swall) - ds->x1;
// find positioning
xscale = FixedMul(rw_pic->xScale, sidedef->GetTextureXScale(side_t::mid));
yscale = FixedMul(rw_pic->yScale, sidedef->GetTextureYScale(side_t::mid));
xscale = FixedMul(rw_pic->xScale, curline->sidedef->GetTextureXScale(side_t::mid));
yscale = FixedMul(rw_pic->yScale, curline->sidedef->GetTextureYScale(side_t::mid));
// encapsulate the lifetime of rowoffset
fixed_t rowoffset = curline->sidedef->GetTextureYOffset(side_t::mid) + rover->master->sidedef[0]->GetTextureYOffset(side_t::mid);
dc_texturemid = rover->model->GetPlaneTexZ(sector_t::ceiling);