diff --git a/docs/rh-log.txt b/docs/rh-log.txt index 15c6a0985..89008e15a 100644 --- a/docs/rh-log.txt +++ b/docs/rh-log.txt @@ -1,4 +1,7 @@ -April 10, 2009 (Changes by Graf Zahl) +April 10, 2009 +- Fixed: World panning was ignored for the X offset of masked midtextures. + +April 10, 2009 (Changes by Graf Zahl) - Extended MF5_MOVEWITHSECTOR so that it always keeps the actor on the ground of a moving floor, regardless of movement speed. For NOBLOCKMAP items this is necessary because otherwise they can be left in the air and it also adds diff --git a/src/r_segs.cpp b/src/r_segs.cpp index e745cb70a..4896288c2 100644 --- a/src/r_segs.cpp +++ b/src/r_segs.cpp @@ -268,7 +268,7 @@ void R_RenderMaskedSegRange (drawseg_t *ds, int x1, int x2) dc_texturemid = MIN (frontsector->GetPlaneTexZ(sector_t::ceiling), backsector->GetPlaneTexZ(sector_t::ceiling)); } - { // encapsilate the lifetime of rowoffset + { // encapsulate the lifetime of rowoffset fixed_t rowoffset = curline->sidedef->GetTextureYOffset(side_t::mid); if (tex->bWorldPanning) { @@ -1629,8 +1629,15 @@ void R_StoreWallRange (int start, int stop) lwal = (fixed_t *)(openings + ds_p->maskedtexturecol); swal = (fixed_t *)(openings + ds_p->swall); - int scaley = TexMan(sidedef->GetTexture(side_t::mid))->yScale; + FTexture *pic = TexMan(sidedef->GetTexture(side_t::mid)); + int scaley = pic->yScale; int xoffset = sidedef->GetTextureXOffset(side_t::mid); + + if (pic->bWorldPanning) + { + xoffset = MulScale16 (xoffset, pic->xScale); + } + for (i = start; i < stop; i++) { *lwal++ = lwall[i] + xoffset; diff --git a/src/textures/texture.cpp b/src/textures/texture.cpp index 4cf9cba00..a899b4f64 100644 --- a/src/textures/texture.cpp +++ b/src/textures/texture.cpp @@ -108,7 +108,9 @@ FTexture * FTexture::CreateTexture (int lumpnum, int usetype) int w = tex->GetWidth(); int h = tex->GetHeight(); - // Auto-scale flats with dimensions 128x128 and 256x256 + // Auto-scale flats with dimensions 128x128 and 256x256. + // In hindsight, a bad idea, but RandomLag made it sound better than it really is. + // Now we're stuck with this stupid behaviour. if (w==128 && h==128) { tex->xScale = tex->yScale = 2*FRACUNIT;