Additional fix for splitting of complex wall in compatibility renderer

warp 2720 -200 -32 on Extreme Terror
https://www.doomworld.com/idgames/levels/doom2/Ports/d-f/exterror
This commit is contained in:
alexey.lysiuk 2016-08-07 14:50:48 +03:00 committed by Christoph Oelckers
parent def3ad7533
commit 9ab9548723
2 changed files with 13 additions and 11 deletions

View File

@ -187,7 +187,7 @@ private:
void RenderLightsCompat(int pass); void RenderLightsCompat(int pass);
void Put3DWall(lightlist_t * lightlist, bool translucent); void Put3DWall(lightlist_t * lightlist, bool translucent);
void SplitWallComplex(sector_t * frontsector, bool translucent, float maplightbottomleft, float maplightbottomright); bool SplitWallComplex(sector_t * frontsector, bool translucent, float& maplightbottomleft, float& maplightbottomright);
void SplitWall(sector_t * frontsector, bool translucent); void SplitWall(sector_t * frontsector, bool translucent);
void SetupLights(); void SetupLights();

View File

@ -264,7 +264,7 @@ void GLWall::Put3DWall(lightlist_t * lightlist, bool translucent)
// //
//========================================================================== //==========================================================================
void GLWall::SplitWallComplex(sector_t * frontsector, bool translucent, float maplightbottomleft, float maplightbottomright) bool GLWall::SplitWallComplex(sector_t * frontsector, bool translucent, float& maplightbottomleft, float& maplightbottomright)
{ {
GLWall copyWall1, copyWall2; GLWall copyWall1, copyWall2;
@ -304,7 +304,7 @@ void GLWall::SplitWallComplex(sector_t * frontsector, bool translucent, float ma
copyWall1.SplitWall(frontsector, translucent); copyWall1.SplitWall(frontsector, translucent);
copyWall2.SplitWall(frontsector, translucent); copyWall2.SplitWall(frontsector, translucent);
return; return true;
} }
} }
@ -345,9 +345,11 @@ void GLWall::SplitWallComplex(sector_t * frontsector, bool translucent, float ma
copyWall1.SplitWall(frontsector, translucent); copyWall1.SplitWall(frontsector, translucent);
copyWall2.SplitWall(frontsector, translucent); copyWall2.SplitWall(frontsector, translucent);
return; return true;
} }
} }
return false;
} }
void GLWall::SplitWall(sector_t * frontsector, bool translucent) void GLWall::SplitWall(sector_t * frontsector, bool translucent)
@ -406,14 +408,14 @@ void GLWall::SplitWall(sector_t * frontsector, bool translucent)
// Use hardware clipping if this cannot be done cleanly. // Use hardware clipping if this cannot be done cleanly.
this->lightlist = &lightlist; this->lightlist = &lightlist;
PutWall(translucent); PutWall(translucent);
}
else
{
// crappy fallback if no clip planes available
SplitWallComplex(frontsector, translucent, maplightbottomleft, maplightbottomright);
}
goto out; goto out;
}
// crappy fallback if no clip planes available
else if (SplitWallComplex(frontsector, translucent, maplightbottomleft, maplightbottomright))
{
goto out;
}
} }
// 3D floor is completely within this light // 3D floor is completely within this light