mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-11 07:12:02 +00:00
Skip neardepth/fardepth checking in R_DrawSprite
- Wall sprites now clip much, much better than before.
This commit is contained in:
parent
7b02027ba7
commit
9659b894a3
1 changed files with 3 additions and 13 deletions
|
@ -2076,19 +2076,9 @@ void R_DrawSprite (vissprite_t *spr)
|
|||
r1 = MAX<int> (ds->x1, x1);
|
||||
r2 = MIN<int> (ds->x2, x2);
|
||||
|
||||
fixed_t neardepth, fardepth;
|
||||
if (ds->sz1 < ds->sz2)
|
||||
{
|
||||
neardepth = ds->sz1, fardepth = ds->sz2;
|
||||
}
|
||||
else
|
||||
{
|
||||
neardepth = ds->sz2, fardepth = ds->sz1;
|
||||
}
|
||||
if (neardepth > spr->depth || (fardepth > spr->depth &&
|
||||
// Check if sprite is in front of draw seg:
|
||||
DMulScale32(spr->gy - ds->curline->v1->y, ds->curline->v2->x - ds->curline->v1->x,
|
||||
ds->curline->v1->x - spr->gx, ds->curline->v2->y - ds->curline->v1->y) <= 0))
|
||||
if (DMulScale32(spr->gy - ds->curline->v1->y, ds->curline->v2->x - ds->curline->v1->x,
|
||||
ds->curline->v1->x - spr->gx, ds->curline->v2->y - ds->curline->v1->y) <= 0)
|
||||
{
|
||||
// seg is behind sprite, so draw the mid texture if it has one
|
||||
if (ds->maskedtexturecol != -1 || ds->bFogBoundary)
|
||||
|
|
Loading…
Reference in a new issue