mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-27 12:31:54 +00:00
Getting polyobject flats to the equivalent functionality BEFORE I changed up how floor offsets worked. (Doesn't touch OGL, since they work perfectly there.)
This commit is contained in:
parent
42ed41aeb1
commit
1d11a14f64
2 changed files with 22 additions and 40 deletions
45
src/r_bsp.c
45
src/r_bsp.c
|
|
@ -1104,30 +1104,12 @@ static void R_Subsector(size_t num)
|
||||||
&& polysec->floorheight >= floorcenterz
|
&& polysec->floorheight >= floorcenterz
|
||||||
&& (viewz < polysec->floorheight))
|
&& (viewz < polysec->floorheight))
|
||||||
{
|
{
|
||||||
fixed_t xoff, yoff;
|
|
||||||
xoff = polysec->floor_xoffs;
|
|
||||||
yoff = polysec->floor_yoffs;
|
|
||||||
|
|
||||||
if (po->angle != 0) {
|
|
||||||
angle_t fineshift = po->angle >> ANGLETOFINESHIFT;
|
|
||||||
|
|
||||||
xoff -= FixedMul(FINECOSINE(fineshift), po->centerPt.x)+FixedMul(FINESINE(fineshift), po->centerPt.y);
|
|
||||||
yoff -= FixedMul(FINESINE(fineshift), po->centerPt.x)-FixedMul(FINECOSINE(fineshift), po->centerPt.y);
|
|
||||||
} else {
|
|
||||||
xoff -= po->centerPt.x;
|
|
||||||
yoff += po->centerPt.y;
|
|
||||||
}
|
|
||||||
|
|
||||||
light = R_GetPlaneLight(frontsector, polysec->floorheight, viewz < polysec->floorheight);
|
light = R_GetPlaneLight(frontsector, polysec->floorheight, viewz < polysec->floorheight);
|
||||||
light = 0;
|
light = 0;
|
||||||
ffloor[numffloors].plane = R_FindPlane(polysec->floorheight, polysec->floorpic,
|
ffloor[numffloors].plane = R_FindPlane(polysec->floorheight, polysec->floorpic,
|
||||||
polysec->lightlevel, xoff, yoff,
|
polysec->lightlevel, polysec->floor_xoffs, polysec->floor_yoffs,
|
||||||
polysec->floorpic_angle-po->angle,
|
polysec->floorpic_angle-po->angle,
|
||||||
NULL,
|
NULL, NULL, po
|
||||||
NULL
|
|
||||||
#ifdef POLYOBJECTS_PLANES
|
|
||||||
, po
|
|
||||||
#endif
|
|
||||||
#ifdef ESLOPE
|
#ifdef ESLOPE
|
||||||
, NULL // will ffloors be slopable eventually?
|
, NULL // will ffloors be slopable eventually?
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -1152,28 +1134,11 @@ static void R_Subsector(size_t num)
|
||||||
&& polysec->ceilingheight <= ceilingcenterz
|
&& polysec->ceilingheight <= ceilingcenterz
|
||||||
&& (viewz > polysec->ceilingheight))
|
&& (viewz > polysec->ceilingheight))
|
||||||
{
|
{
|
||||||
fixed_t xoff, yoff;
|
|
||||||
xoff = polysec->ceiling_xoffs;
|
|
||||||
yoff = polysec->ceiling_yoffs;
|
|
||||||
|
|
||||||
if (po->angle != 0) {
|
|
||||||
angle_t fineshift = po->angle >> ANGLETOFINESHIFT;
|
|
||||||
|
|
||||||
xoff -= FixedMul(FINECOSINE(fineshift), po->centerPt.x)+FixedMul(FINESINE(fineshift), po->centerPt.y);
|
|
||||||
yoff -= FixedMul(FINESINE(fineshift), po->centerPt.x)-FixedMul(FINECOSINE(fineshift), po->centerPt.y);
|
|
||||||
} else {
|
|
||||||
xoff -= po->centerPt.x;
|
|
||||||
yoff += po->centerPt.y;
|
|
||||||
}
|
|
||||||
|
|
||||||
light = R_GetPlaneLight(frontsector, polysec->ceilingheight, viewz < polysec->ceilingheight);
|
light = R_GetPlaneLight(frontsector, polysec->ceilingheight, viewz < polysec->ceilingheight);
|
||||||
light = 0;
|
light = 0;
|
||||||
ffloor[numffloors].plane = R_FindPlane(polysec->ceilingheight, polysec->ceilingpic,
|
ffloor[numffloors].plane = R_FindPlane(polysec->ceilingheight, polysec->ceilingpic,
|
||||||
polysec->lightlevel, xoff, yoff, polysec->ceilingpic_angle-po->angle,
|
polysec->lightlevel, polysec->ceiling_xoffs, polysec->ceiling_yoffs, polysec->ceilingpic_angle-po->angle,
|
||||||
NULL, NULL
|
NULL, NULL, po
|
||||||
#ifdef POLYOBJECTS_PLANES
|
|
||||||
, po
|
|
||||||
#endif
|
|
||||||
#ifdef ESLOPE
|
#ifdef ESLOPE
|
||||||
, NULL // will ffloors be slopable eventually?
|
, NULL // will ffloors be slopable eventually?
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -459,6 +459,23 @@ visplane_t *R_FindPlane(fixed_t height, INT32 picnum, INT32 lightlevel,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef POLYOBJECTS_PLANES
|
||||||
|
if (polyobj)
|
||||||
|
{
|
||||||
|
if (polyobj->angle != 0)
|
||||||
|
{
|
||||||
|
angle_t fineshift = polyobj->angle >> ANGLETOFINESHIFT;
|
||||||
|
xoff -= FixedMul(FINECOSINE(fineshift), polyobj->centerPt.x)+FixedMul(FINESINE(fineshift), polyobj->centerPt.y);
|
||||||
|
yoff -= FixedMul(FINESINE(fineshift), polyobj->centerPt.x)-FixedMul(FINECOSINE(fineshift), polyobj->centerPt.y);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
xoff -= polyobj->centerPt.x;
|
||||||
|
yoff += polyobj->centerPt.y;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
// This appears to fix the Nimbus Ruins sky bug.
|
// This appears to fix the Nimbus Ruins sky bug.
|
||||||
if (picnum == skyflatnum && pfloor)
|
if (picnum == skyflatnum && pfloor)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue