Skip to content
Permalink
Browse files
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.
  • Loading branch information
eevee committed Jun 7, 2015
1 parent 662345a commit 8fa9aa26275e71b32cd92065c7ba6d80c7fd1b17
Showing 1 changed file with 2 additions and 2 deletions.
@@ -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);

0 comments on commit 8fa9aa2

Please sign in to comment.