From 0991d45838e8f81f7208d890780eb755da94d801 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Tue, 7 Jun 2011 06:41:49 +0000 Subject: [PATCH] - added kgsws's 3D floor textute rotation fix. SVN r3221 (trunk) --- src/r_bsp.cpp | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/src/r_bsp.cpp b/src/r_bsp.cpp index 726986fb6..d3b01a865 100644 --- a/src/r_bsp.cpp +++ b/src/r_bsp.cpp @@ -1120,7 +1120,7 @@ void R_Subsector (subsector_t *sub) int floorlightlevel; // killough 3/16/98: set floor lightlevel int ceilinglightlevel; // killough 4/11/98 bool outersubsector; - int fll, cll; + int fll, cll, position; // kg3D - fake floor stuff visplane_t *backupfp; @@ -1269,10 +1269,12 @@ void R_Subsector (subsector_t *sub) fake3D = FAKE3D_FAKEFLOOR; tempsec = *fakeFloor->model; tempsec.floorplane = *fakeFloor->top.plane; + tempsec.ceilingplane = *fakeFloor->bottom.plane; if (!(fakeFloor->flags & FF_THISINSIDE) && !(fakeFloor->flags & FF_INVERTSECTOR)) { tempsec.SetTexture(sector_t::floor, tempsec.GetTexture(sector_t::ceiling)); - } + position = sector_t::ceiling; + } else position = sector_t::floor; frontsector = &tempsec; if (fixedlightlev < 0 && sub->sector->e->XFloor.lightlist.Size()) @@ -1288,11 +1290,11 @@ void R_Subsector (subsector_t *sub) floorlightlevel + r_actualextralight, // killough 3/16/98 frontsector->GetAlpha(sector_t::floor), !!(frontsector->GetFlags(sector_t::floor) & PLANEF_ADDITIVE), - frontsector->GetXOffset(sector_t::floor), // killough 3/7/98 - frontsector->GetYOffset(sector_t::floor), // killough 3/7/98 - frontsector->GetXScale(sector_t::floor), - frontsector->GetYScale(sector_t::floor), - frontsector->GetAngle(sector_t::floor), + frontsector->GetXOffset(position), // killough 3/7/98 + frontsector->GetYOffset(position), // killough 3/7/98 + frontsector->GetXScale(position), + frontsector->GetYScale(position), + frontsector->GetAngle(position), frontsector->sky, NULL); @@ -1328,12 +1330,14 @@ void R_Subsector (subsector_t *sub) { fake3D = FAKE3D_FAKECEILING; tempsec = *fakeFloor->model; + tempsec.floorplane = *fakeFloor->top.plane; tempsec.ceilingplane = *fakeFloor->bottom.plane; if ((!(fakeFloor->flags & FF_THISINSIDE) && !(fakeFloor->flags & FF_INVERTSECTOR)) || (fakeFloor->flags & FF_THISINSIDE && fakeFloor->flags & FF_INVERTSECTOR)) { tempsec.SetTexture(sector_t::ceiling, tempsec.GetTexture(sector_t::floor)); - } + position = sector_t::floor; + } else position = sector_t::ceiling; frontsector = &tempsec; tempsec.ceilingplane.ChangeHeight(-1); @@ -1351,11 +1355,11 @@ void R_Subsector (subsector_t *sub) ceilinglightlevel + r_actualextralight, // killough 4/11/98 frontsector->GetAlpha(sector_t::ceiling), !!(frontsector->GetFlags(sector_t::ceiling) & PLANEF_ADDITIVE), - frontsector->GetXOffset(sector_t::ceiling), // killough 3/7/98 - frontsector->GetYOffset(sector_t::ceiling), // killough 3/7/98 - frontsector->GetXScale(sector_t::ceiling), - frontsector->GetYScale(sector_t::ceiling), - frontsector->GetAngle(sector_t::ceiling), + frontsector->GetXOffset(position), // killough 3/7/98 + frontsector->GetYOffset(position), // killough 3/7/98 + frontsector->GetXScale(position), + frontsector->GetYScale(position), + frontsector->GetAngle(position), frontsector->sky, NULL);