mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Revert "Do not sort sprite in front of plane if plane should render in front of sprite's plane"
This reverts commit 0d6f329b1d.
This commit is contained in:
parent
d79c719ad9
commit
648f1f0958
2 changed files with 2 additions and 36 deletions
|
|
@ -1230,32 +1230,6 @@ fixed_t R_GetShadowZ(mobj_t *thing, pslope_t **shadowslope)
|
|||
return groundz;
|
||||
}
|
||||
|
||||
static void R_SetSpritePlaneHeights(vissprite_t *vis)
|
||||
{
|
||||
ffloor_t *rover;
|
||||
|
||||
fixed_t top;
|
||||
fixed_t bot;
|
||||
|
||||
vis->pt = vis->sector->floorheight;
|
||||
vis->pb = vis->sector->ceilingheight;
|
||||
|
||||
for (rover = vis->sector->ffloors; rover; rover = rover->next)
|
||||
{
|
||||
if (rover->flags & FF_EXISTS)
|
||||
{
|
||||
top = P_GetFFloorTopZAt (rover, vis->gx, vis->gy);
|
||||
bot = P_GetFFloorBottomZAt (rover, vis->gx, vis->gy);
|
||||
|
||||
if (top <= vis->gzt && top > vis->pt)
|
||||
vis->pt = top;
|
||||
|
||||
if (bot >= vis->gz && bot < vis->pb)
|
||||
vis->pb = bot;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void R_ProjectDropShadow(mobj_t *thing, vissprite_t *vis, fixed_t scale, fixed_t tx, fixed_t tz)
|
||||
{
|
||||
vissprite_t *shadow;
|
||||
|
|
@ -1344,8 +1318,6 @@ static void R_ProjectDropShadow(mobj_t *thing, vissprite_t *vis, fixed_t scale,
|
|||
shadow->xscale = FixedMul(xscale, shadowxscale); //SoM: 4/17/2000
|
||||
shadow->scale = FixedMul(yscale, shadowyscale);
|
||||
shadow->sector = vis->sector;
|
||||
shadow->pt = vis->pt;
|
||||
shadow->pb = vis->pb;
|
||||
shadow->szt = (INT16)((centeryfrac - FixedMul(shadow->gzt - viewz, yscale))>>FRACBITS);
|
||||
shadow->sz = (INT16)((centeryfrac - FixedMul(shadow->gz - viewz, yscale))>>FRACBITS);
|
||||
shadow->cut = SC_ISSCALED|SC_SHADOW; //check this
|
||||
|
|
@ -1845,9 +1817,6 @@ static void R_ProjectSprite(mobj_t *thing)
|
|||
vis->sector = thing->subsector->sector;
|
||||
vis->szt = (INT16)((centeryfrac - FixedMul(vis->gzt - viewz, sortscale))>>FRACBITS);
|
||||
vis->sz = (INT16)((centeryfrac - FixedMul(vis->gz - viewz, sortscale))>>FRACBITS);
|
||||
|
||||
R_SetSpritePlaneHeights(vis);
|
||||
|
||||
vis->cut = cut;
|
||||
if (thing->subsector->sector->numlights)
|
||||
vis->extra_colormap = *thing->subsector->sector->lightlist[light].extra_colormap;
|
||||
|
|
@ -2062,8 +2031,6 @@ static void R_ProjectPrecipitationSprite(precipmobj_t *thing)
|
|||
vis->szt = (INT16)((centeryfrac - FixedMul(vis->gzt - viewz, yscale))>>FRACBITS);
|
||||
vis->sz = (INT16)((centeryfrac - FixedMul(vis->gz - viewz, yscale))>>FRACBITS);
|
||||
|
||||
R_SetSpritePlaneHeights(vis);
|
||||
|
||||
iscale = FixedDiv(FRACUNIT, xscale);
|
||||
|
||||
vis->startfrac = 0;
|
||||
|
|
@ -2443,12 +2410,12 @@ static void R_CreateDrawNodes(maskcount_t* mask, drawnode_t* head, boolean temps
|
|||
// bird: if any part of the sprite peeks in front the plane
|
||||
if (planecameraz < viewz)
|
||||
{
|
||||
if (rover->pt >= planeobjectz && rover->gzt >= planeobjectz)
|
||||
if (rover->gzt >= planeobjectz)
|
||||
continue;
|
||||
}
|
||||
else if (planecameraz > viewz)
|
||||
{
|
||||
if (rover->pb <= planeobjectz && rover->gz <= planeobjectz)
|
||||
if (rover->gz <= planeobjectz)
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -171,7 +171,6 @@ typedef struct vissprite_s
|
|||
|
||||
// Precalculated top and bottom screen coords for the sprite.
|
||||
sector_t *sector; // The sector containing the thing.
|
||||
fixed_t pt, pb; // plane heights, also for sorting against 3D floors
|
||||
INT16 sz, szt;
|
||||
|
||||
spritecut_e cut;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue