mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2025-01-13 13:21:31 +00:00
R_FindPlane now has a polyobj argument, R_DrawPlanes now skips polyobj planes, like it does with FOF planes
This commit is contained in:
parent
1c23a84aa5
commit
b66925e467
3 changed files with 32 additions and 4 deletions
20
src/r_bsp.c
20
src/r_bsp.c
|
@ -925,6 +925,9 @@ static void R_Subsector(size_t num)
|
||||||
{
|
{
|
||||||
floorplane = R_FindPlane(frontsector->floorheight, frontsector->floorpic, floorlightlevel,
|
floorplane = R_FindPlane(frontsector->floorheight, frontsector->floorpic, floorlightlevel,
|
||||||
frontsector->floor_xoffs, frontsector->floor_yoffs, frontsector->floorpic_angle, floorcolormap, NULL
|
frontsector->floor_xoffs, frontsector->floor_yoffs, frontsector->floorpic_angle, floorcolormap, NULL
|
||||||
|
#ifdef POLYOBJECTS_PLANES
|
||||||
|
, NULL
|
||||||
|
#endif
|
||||||
#ifdef ESLOPE
|
#ifdef ESLOPE
|
||||||
, frontsector->f_slope
|
, frontsector->f_slope
|
||||||
#endif
|
#endif
|
||||||
|
@ -944,6 +947,9 @@ static void R_Subsector(size_t num)
|
||||||
ceilingplane = R_FindPlane(frontsector->ceilingheight, frontsector->ceilingpic,
|
ceilingplane = R_FindPlane(frontsector->ceilingheight, frontsector->ceilingpic,
|
||||||
ceilinglightlevel, frontsector->ceiling_xoffs, frontsector->ceiling_yoffs, frontsector->ceilingpic_angle,
|
ceilinglightlevel, frontsector->ceiling_xoffs, frontsector->ceiling_yoffs, frontsector->ceilingpic_angle,
|
||||||
ceilingcolormap, NULL
|
ceilingcolormap, NULL
|
||||||
|
#ifdef POLYOBJECTS_PLANES
|
||||||
|
, NULL
|
||||||
|
#endif
|
||||||
#ifdef ESLOPE
|
#ifdef ESLOPE
|
||||||
, frontsector->c_slope
|
, frontsector->c_slope
|
||||||
#endif
|
#endif
|
||||||
|
@ -1002,6 +1008,9 @@ static void R_Subsector(size_t num)
|
||||||
ffloor[numffloors].plane = R_FindPlane(*rover->bottomheight, *rover->bottompic,
|
ffloor[numffloors].plane = R_FindPlane(*rover->bottomheight, *rover->bottompic,
|
||||||
*frontsector->lightlist[light].lightlevel, *rover->bottomxoffs,
|
*frontsector->lightlist[light].lightlevel, *rover->bottomxoffs,
|
||||||
*rover->bottomyoffs, *rover->bottomangle, frontsector->lightlist[light].extra_colormap, rover
|
*rover->bottomyoffs, *rover->bottomangle, frontsector->lightlist[light].extra_colormap, rover
|
||||||
|
#ifdef POLYOBJECTS_PLANES
|
||||||
|
, NULL
|
||||||
|
#endif
|
||||||
#ifdef ESLOPE
|
#ifdef ESLOPE
|
||||||
, *rover->b_slope
|
, *rover->b_slope
|
||||||
#endif
|
#endif
|
||||||
|
@ -1045,6 +1054,9 @@ static void R_Subsector(size_t num)
|
||||||
ffloor[numffloors].plane = R_FindPlane(*rover->topheight, *rover->toppic,
|
ffloor[numffloors].plane = R_FindPlane(*rover->topheight, *rover->toppic,
|
||||||
*frontsector->lightlist[light].lightlevel, *rover->topxoffs, *rover->topyoffs, *rover->topangle,
|
*frontsector->lightlist[light].lightlevel, *rover->topxoffs, *rover->topyoffs, *rover->topangle,
|
||||||
frontsector->lightlist[light].extra_colormap, rover
|
frontsector->lightlist[light].extra_colormap, rover
|
||||||
|
#ifdef POLYOBJECTS_PLANES
|
||||||
|
, NULL
|
||||||
|
#endif
|
||||||
#ifdef ESLOPE
|
#ifdef ESLOPE
|
||||||
, *rover->t_slope
|
, *rover->t_slope
|
||||||
#endif
|
#endif
|
||||||
|
@ -1111,11 +1123,13 @@ static void R_Subsector(size_t num)
|
||||||
polysec->floorpic_angle-po->angle,
|
polysec->floorpic_angle-po->angle,
|
||||||
NULL,
|
NULL,
|
||||||
NULL
|
NULL
|
||||||
|
#ifdef POLYOBJECTS_PLANES
|
||||||
|
, po
|
||||||
|
#endif
|
||||||
#ifdef ESLOPE
|
#ifdef ESLOPE
|
||||||
, NULL // will ffloors be slopable eventually?
|
, NULL // will ffloors be slopable eventually?
|
||||||
#endif
|
#endif
|
||||||
);
|
);
|
||||||
//ffloor[numffloors].plane->polyobj = po;
|
|
||||||
|
|
||||||
ffloor[numffloors].height = polysec->floorheight;
|
ffloor[numffloors].height = polysec->floorheight;
|
||||||
ffloor[numffloors].polyobj = po;
|
ffloor[numffloors].polyobj = po;
|
||||||
|
@ -1155,11 +1169,13 @@ static void R_Subsector(size_t num)
|
||||||
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, xoff, yoff, polysec->ceilingpic_angle-po->angle,
|
||||||
NULL, NULL
|
NULL, NULL
|
||||||
|
#ifdef POLYOBJECTS_PLANES
|
||||||
|
, po
|
||||||
|
#endif
|
||||||
#ifdef ESLOPE
|
#ifdef ESLOPE
|
||||||
, NULL // will ffloors be slopable eventually?
|
, NULL // will ffloors be slopable eventually?
|
||||||
#endif
|
#endif
|
||||||
);
|
);
|
||||||
//ffloor[numffloors].plane->polyobj = po;
|
|
||||||
|
|
||||||
ffloor[numffloors].polyobj = po;
|
ffloor[numffloors].polyobj = po;
|
||||||
ffloor[numffloors].height = polysec->ceilingheight;
|
ffloor[numffloors].height = polysec->ceilingheight;
|
||||||
|
|
|
@ -431,6 +431,9 @@ static visplane_t *new_visplane(unsigned hash)
|
||||||
visplane_t *R_FindPlane(fixed_t height, INT32 picnum, INT32 lightlevel,
|
visplane_t *R_FindPlane(fixed_t height, INT32 picnum, INT32 lightlevel,
|
||||||
fixed_t xoff, fixed_t yoff, angle_t plangle, extracolormap_t *planecolormap,
|
fixed_t xoff, fixed_t yoff, angle_t plangle, extracolormap_t *planecolormap,
|
||||||
ffloor_t *pfloor
|
ffloor_t *pfloor
|
||||||
|
#ifdef POLYOBJECTS_PLANES
|
||||||
|
, polyobj_t *polyobj
|
||||||
|
#endif
|
||||||
#ifdef ESLOPE
|
#ifdef ESLOPE
|
||||||
, pslope_t *slope
|
, pslope_t *slope
|
||||||
#endif
|
#endif
|
||||||
|
@ -470,6 +473,8 @@ visplane_t *R_FindPlane(fixed_t height, INT32 picnum, INT32 lightlevel,
|
||||||
#ifdef POLYOBJECTS_PLANES
|
#ifdef POLYOBJECTS_PLANES
|
||||||
if (check->polyobj && pfloor)
|
if (check->polyobj && pfloor)
|
||||||
continue;
|
continue;
|
||||||
|
if (polyobj != check->polyobj)
|
||||||
|
continue;
|
||||||
#endif
|
#endif
|
||||||
if (height == check->height && picnum == check->picnum
|
if (height == check->height && picnum == check->picnum
|
||||||
&& lightlevel == check->lightlevel
|
&& lightlevel == check->lightlevel
|
||||||
|
@ -504,7 +509,7 @@ visplane_t *R_FindPlane(fixed_t height, INT32 picnum, INT32 lightlevel,
|
||||||
check->viewangle = viewangle;
|
check->viewangle = viewangle;
|
||||||
check->plangle = plangle;
|
check->plangle = plangle;
|
||||||
#ifdef POLYOBJECTS_PLANES
|
#ifdef POLYOBJECTS_PLANES
|
||||||
check->polyobj = NULL;
|
check->polyobj = polyobj;
|
||||||
#endif
|
#endif
|
||||||
#ifdef ESLOPE
|
#ifdef ESLOPE
|
||||||
check->slope = slope;
|
check->slope = slope;
|
||||||
|
@ -719,7 +724,11 @@ void R_DrawPlanes(void)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pl->ffloor != NULL)
|
if (pl->ffloor != NULL
|
||||||
|
#ifdef POLYOBJECTS_PLANES
|
||||||
|
|| pl->polyobj != NULL
|
||||||
|
#endif
|
||||||
|
)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
R_DrawSinglePlane(pl);
|
R_DrawSinglePlane(pl);
|
||||||
|
|
|
@ -97,6 +97,9 @@ void R_MakeSpans(INT32 x, INT32 t1, INT32 b1, INT32 t2, INT32 b2);
|
||||||
void R_DrawPlanes(void);
|
void R_DrawPlanes(void);
|
||||||
visplane_t *R_FindPlane(fixed_t height, INT32 picnum, INT32 lightlevel, fixed_t xoff, fixed_t yoff, angle_t plangle,
|
visplane_t *R_FindPlane(fixed_t height, INT32 picnum, INT32 lightlevel, fixed_t xoff, fixed_t yoff, angle_t plangle,
|
||||||
extracolormap_t *planecolormap, ffloor_t *ffloor
|
extracolormap_t *planecolormap, ffloor_t *ffloor
|
||||||
|
#ifdef POLYOBJECTS_PLANES
|
||||||
|
, polyobj_t *polyobj
|
||||||
|
#endif
|
||||||
#ifdef ESLOPE
|
#ifdef ESLOPE
|
||||||
, pslope_t *slope
|
, pslope_t *slope
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue