- added kgsws's 3D floor textute rotation fix.

SVN r3221 (trunk)
This commit is contained in:
Christoph Oelckers 2011-06-07 06:41:49 +00:00
parent 2e4e5bdb28
commit 0991d45838

View file

@ -1120,7 +1120,7 @@ void R_Subsector (subsector_t *sub)
int floorlightlevel; // killough 3/16/98: set floor lightlevel int floorlightlevel; // killough 3/16/98: set floor lightlevel
int ceilinglightlevel; // killough 4/11/98 int ceilinglightlevel; // killough 4/11/98
bool outersubsector; bool outersubsector;
int fll, cll; int fll, cll, position;
// kg3D - fake floor stuff // kg3D - fake floor stuff
visplane_t *backupfp; visplane_t *backupfp;
@ -1269,10 +1269,12 @@ void R_Subsector (subsector_t *sub)
fake3D = FAKE3D_FAKEFLOOR; fake3D = FAKE3D_FAKEFLOOR;
tempsec = *fakeFloor->model; tempsec = *fakeFloor->model;
tempsec.floorplane = *fakeFloor->top.plane; tempsec.floorplane = *fakeFloor->top.plane;
tempsec.ceilingplane = *fakeFloor->bottom.plane;
if (!(fakeFloor->flags & FF_THISINSIDE) && !(fakeFloor->flags & FF_INVERTSECTOR)) if (!(fakeFloor->flags & FF_THISINSIDE) && !(fakeFloor->flags & FF_INVERTSECTOR))
{ {
tempsec.SetTexture(sector_t::floor, tempsec.GetTexture(sector_t::ceiling)); tempsec.SetTexture(sector_t::floor, tempsec.GetTexture(sector_t::ceiling));
} position = sector_t::ceiling;
} else position = sector_t::floor;
frontsector = &tempsec; frontsector = &tempsec;
if (fixedlightlev < 0 && sub->sector->e->XFloor.lightlist.Size()) 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 floorlightlevel + r_actualextralight, // killough 3/16/98
frontsector->GetAlpha(sector_t::floor), frontsector->GetAlpha(sector_t::floor),
!!(frontsector->GetFlags(sector_t::floor) & PLANEF_ADDITIVE), !!(frontsector->GetFlags(sector_t::floor) & PLANEF_ADDITIVE),
frontsector->GetXOffset(sector_t::floor), // killough 3/7/98 frontsector->GetXOffset(position), // killough 3/7/98
frontsector->GetYOffset(sector_t::floor), // killough 3/7/98 frontsector->GetYOffset(position), // killough 3/7/98
frontsector->GetXScale(sector_t::floor), frontsector->GetXScale(position),
frontsector->GetYScale(sector_t::floor), frontsector->GetYScale(position),
frontsector->GetAngle(sector_t::floor), frontsector->GetAngle(position),
frontsector->sky, frontsector->sky,
NULL); NULL);
@ -1328,12 +1330,14 @@ void R_Subsector (subsector_t *sub)
{ {
fake3D = FAKE3D_FAKECEILING; fake3D = FAKE3D_FAKECEILING;
tempsec = *fakeFloor->model; tempsec = *fakeFloor->model;
tempsec.floorplane = *fakeFloor->top.plane;
tempsec.ceilingplane = *fakeFloor->bottom.plane; tempsec.ceilingplane = *fakeFloor->bottom.plane;
if ((!(fakeFloor->flags & FF_THISINSIDE) && !(fakeFloor->flags & FF_INVERTSECTOR)) || if ((!(fakeFloor->flags & FF_THISINSIDE) && !(fakeFloor->flags & FF_INVERTSECTOR)) ||
(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)); tempsec.SetTexture(sector_t::ceiling, tempsec.GetTexture(sector_t::floor));
} position = sector_t::floor;
} else position = sector_t::ceiling;
frontsector = &tempsec; frontsector = &tempsec;
tempsec.ceilingplane.ChangeHeight(-1); tempsec.ceilingplane.ChangeHeight(-1);
@ -1351,11 +1355,11 @@ void R_Subsector (subsector_t *sub)
ceilinglightlevel + r_actualextralight, // killough 4/11/98 ceilinglightlevel + r_actualextralight, // killough 4/11/98
frontsector->GetAlpha(sector_t::ceiling), frontsector->GetAlpha(sector_t::ceiling),
!!(frontsector->GetFlags(sector_t::ceiling) & PLANEF_ADDITIVE), !!(frontsector->GetFlags(sector_t::ceiling) & PLANEF_ADDITIVE),
frontsector->GetXOffset(sector_t::ceiling), // killough 3/7/98 frontsector->GetXOffset(position), // killough 3/7/98
frontsector->GetYOffset(sector_t::ceiling), // killough 3/7/98 frontsector->GetYOffset(position), // killough 3/7/98
frontsector->GetXScale(sector_t::ceiling), frontsector->GetXScale(position),
frontsector->GetYScale(sector_t::ceiling), frontsector->GetYScale(position),
frontsector->GetAngle(sector_t::ceiling), frontsector->GetAngle(position),
frontsector->sky, frontsector->sky,
NULL); NULL);