mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-26 14:01:45 +00:00
Fix scaling of 3D floor wall textures.
The scale factors are now taken from the same part of the sidedef that provides the texture.
This commit is contained in:
parent
8fa9aa2627
commit
15b97c1409
1 changed files with 19 additions and 2 deletions
|
@ -557,8 +557,25 @@ 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, curline->sidedef->GetTextureXScale(side_t::mid));
|
||||
yscale = FixedMul(rw_pic->yScale, curline->sidedef->GetTextureYScale(side_t::mid));
|
||||
side_t *scaledside;
|
||||
side_t::ETexpart scaledpart;
|
||||
if (rover->flags & FF_UPPERTEXTURE)
|
||||
{
|
||||
scaledside = curline->sidedef;
|
||||
scaledpart = side_t::top;
|
||||
}
|
||||
else if (rover->flags & FF_LOWERTEXTURE)
|
||||
{
|
||||
scaledside = curline->sidedef;
|
||||
scaledpart = side_t::bottom;
|
||||
}
|
||||
else
|
||||
{
|
||||
scaledside = rover->master->sidedef[0];
|
||||
scaledpart = side_t::mid;
|
||||
}
|
||||
xscale = FixedMul(rw_pic->xScale, scaledside->GetTextureXScale(scaledpart));
|
||||
yscale = FixedMul(rw_pic->yScale, scaledside->GetTextureYScale(scaledpart));
|
||||
// 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);
|
||||
|
|
Loading…
Reference in a new issue