mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-12-12 11:03:02 +00:00
More HWR_ProcessSeg sky code from master
This commit is contained in:
parent
e3edf5e3a2
commit
5287303a5e
1 changed files with 17 additions and 9 deletions
|
|
@ -1183,8 +1183,10 @@ static void HWR_ProcessSeg(void) // Sort of like GLWall::Process in GZDoom
|
||||||
|
|
||||||
if (gr_backsector)
|
if (gr_backsector)
|
||||||
{
|
{
|
||||||
INT32 gr_toptexture, gr_bottomtexture;
|
INT32 gr_toptexture = 0, gr_bottomtexture = 0;
|
||||||
// two sided line
|
// two sided line
|
||||||
|
boolean bothceilingssky = false; // turned on if both back and front ceilings are sky
|
||||||
|
boolean bothfloorssky = false; // likewise, but for floors
|
||||||
|
|
||||||
#ifdef ESLOPE
|
#ifdef ESLOPE
|
||||||
SLOPEPARAMS(gr_backsector->c_slope, worldhigh, worldhighslope, gr_backsector->ceilingheight)
|
SLOPEPARAMS(gr_backsector->c_slope, worldhigh, worldhighslope, gr_backsector->ceilingheight)
|
||||||
|
|
@ -1197,17 +1199,23 @@ static void HWR_ProcessSeg(void) // Sort of like GLWall::Process in GZDoom
|
||||||
|
|
||||||
// hack to allow height changes in outdoor areas
|
// hack to allow height changes in outdoor areas
|
||||||
// This is what gets rid of the upper textures if there should be sky
|
// This is what gets rid of the upper textures if there should be sky
|
||||||
if (gr_frontsector->ceilingpic == skyflatnum &&
|
if (gr_frontsector->ceilingpic == skyflatnum
|
||||||
gr_backsector->ceilingpic == skyflatnum)
|
&& gr_backsector->ceilingpic == skyflatnum)
|
||||||
{
|
{
|
||||||
worldtop = worldhigh;
|
bothceilingssky = true;
|
||||||
#ifdef ESLOPE
|
|
||||||
worldtopslope = worldhighslope;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
gr_toptexture = R_GetTextureNum(gr_sidedef->toptexture);
|
// likewise, but for floors and upper textures
|
||||||
gr_bottomtexture = R_GetTextureNum(gr_sidedef->bottomtexture);
|
if (gr_frontsector->floorpic == skyflatnum
|
||||||
|
&& gr_backsector->floorpic == skyflatnum)
|
||||||
|
{
|
||||||
|
bothfloorssky = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!bothceilingssky)
|
||||||
|
gr_toptexture = R_GetTextureNum(gr_sidedef->toptexture);
|
||||||
|
if (!bothfloorssky)
|
||||||
|
gr_bottomtexture = R_GetTextureNum(gr_sidedef->bottomtexture);
|
||||||
|
|
||||||
// check TOP TEXTURE
|
// check TOP TEXTURE
|
||||||
if ((
|
if ((
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue