Add Terrain FloorClip support for OpenGL
This commit is contained in:
parent
a544be6b84
commit
208a75e6e8
2 changed files with 6 additions and 2 deletions
|
|
@ -3385,7 +3385,7 @@ static void HWR_SplitSprite(gl_vissprite_t *spr)
|
|||
}
|
||||
|
||||
// push it toward the camera to mitigate floor-clipping sprites
|
||||
if (!R_ThingIsPaperSprite(spr->mobj)) // but not for papersprites
|
||||
if (!R_ThingIsPaperSprite(spr->mobj) && !(spr->mobj->terrain && spr->mobj->terrain->floorClip)) // but not for papersprites or for floorclip
|
||||
{
|
||||
// Let dispoffset work first since this adjust each vertex
|
||||
HWR_RotateSpritePolyToAim(spr, baseWallVerts, false);
|
||||
|
|
@ -3844,7 +3844,7 @@ static void HWR_DrawSprite(gl_vissprite_t *spr)
|
|||
float sprdist = 0.0f, distfact = 0.0f;
|
||||
size_t i;
|
||||
|
||||
if (!splat && !R_ThingIsPaperSprite(spr->mobj))
|
||||
if (!splat && !R_ThingIsPaperSprite(spr->mobj) && !(spr->mobj->terrain && spr->mobj->terrain->floorClip))
|
||||
{
|
||||
// Let dispoffset work first since this adjust each vertex
|
||||
HWR_RotateSpritePolyToAim(spr, wallVerts, false);
|
||||
|
|
@ -4991,6 +4991,9 @@ static void HWR_ProjectSprite(mobj_t *thing)
|
|||
x1 = tr_x + x1 * rightcos;
|
||||
x2 = tr_x - x2 * rightcos;
|
||||
|
||||
if (thing->terrain && thing->terrain->floorClip)
|
||||
spr_topoffset -= thing->terrain->floorClip;
|
||||
|
||||
if (vflip)
|
||||
{
|
||||
gz = FIXED_TO_FLOAT(interp.z + thing->height) - (FIXED_TO_FLOAT(spr_topoffset) * this_yscale);
|
||||
|
|
|
|||
|
|
@ -2203,6 +2203,7 @@ void *W_CachePatchLongName(const char *name, INT32 tag)
|
|||
*/
|
||||
void W_VerifyFileHash(UINT16 wadfilenum, UINT64 matchhash)
|
||||
{
|
||||
return;
|
||||
#ifdef NOFILEHASH
|
||||
(void)wadfilenum;
|
||||
(void)matchhash;
|
||||
|
|
|
|||
Loading…
Reference in a new issue