mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-28 04:51:42 +00:00
A revert of the sorting because it produced better (but not perfect) results for paper and normal mobj interaction.
Also, I added more sortscale handling in the places where I forgot it. I probably need some help with the maths here to get this to work nicely. http://gfycat.com/LimpAgedDowitcher
This commit is contained in:
parent
fbff05bd17
commit
552a67200c
1 changed files with 7 additions and 6 deletions
|
|
@ -1152,7 +1152,7 @@ static void R_ProjectSprite(mobj_t *thing)
|
||||||
|
|
||||||
// aspect ratio stuff
|
// aspect ratio stuff
|
||||||
xscale = FixedDiv(projection, tz);
|
xscale = FixedDiv(projection, tz);
|
||||||
yscale = FixedDiv(projectiony, tz);
|
sortscale = FixedDiv(projectiony, tz);
|
||||||
|
|
||||||
// decide which patch to use for sprite relative to player
|
// decide which patch to use for sprite relative to player
|
||||||
#ifdef RANGECHECK
|
#ifdef RANGECHECK
|
||||||
|
|
@ -1293,12 +1293,13 @@ static void R_ProjectSprite(mobj_t *thing)
|
||||||
|
|
||||||
scalestep = (yscale2 - yscale)/range;
|
scalestep = (yscale2 - yscale)/range;
|
||||||
|
|
||||||
sortscale = max(yscale, yscale2);
|
//sortscale = yscale + scalestep*((centerxfrac>>FRACBITS) - x1);
|
||||||
|
//sortscale = max(yscale, yscale2);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
scalestep = 0;
|
scalestep = 0;
|
||||||
sortscale = yscale;
|
yscale = sortscale;
|
||||||
}
|
}
|
||||||
|
|
||||||
xscale = FixedMul(xscale, ang_scale);
|
xscale = FixedMul(xscale, ang_scale);
|
||||||
|
|
@ -1412,8 +1413,8 @@ static void R_ProjectSprite(mobj_t *thing)
|
||||||
|
|
||||||
vis->xscale = xscale; //SoM: 4/17/2000
|
vis->xscale = xscale; //SoM: 4/17/2000
|
||||||
vis->sector = thing->subsector->sector;
|
vis->sector = thing->subsector->sector;
|
||||||
vis->szt = (INT16)((centeryfrac - FixedMul(vis->gzt - viewz, yscale))>>FRACBITS);
|
vis->szt = (INT16)((centeryfrac - FixedMul(vis->gzt - viewz, sortscale))>>FRACBITS);
|
||||||
vis->sz = (INT16)((centeryfrac - FixedMul(vis->gz - viewz, yscale))>>FRACBITS);
|
vis->sz = (INT16)((centeryfrac - FixedMul(vis->gz - viewz, sortscale))>>FRACBITS);
|
||||||
vis->cut = SC_NONE;
|
vis->cut = SC_NONE;
|
||||||
if (thing->subsector->sector->numlights)
|
if (thing->subsector->sector->numlights)
|
||||||
vis->extra_colormap = thing->subsector->sector->lightlist[light].extra_colormap;
|
vis->extra_colormap = thing->subsector->sector->lightlist[light].extra_colormap;
|
||||||
|
|
@ -1596,7 +1597,7 @@ static void R_ProjectPrecipitationSprite(precipmobj_t *thing)
|
||||||
|
|
||||||
// store information in a vissprite
|
// store information in a vissprite
|
||||||
vis = R_NewVisSprite();
|
vis = R_NewVisSprite();
|
||||||
vis->scale = yscale; //<<detailshift;
|
vis->scale = vis->sortscale = yscale; //<<detailshift;
|
||||||
vis->dispoffset = 0; // Monster Iestyn: 23/11/15
|
vis->dispoffset = 0; // Monster Iestyn: 23/11/15
|
||||||
vis->gx = thing->x;
|
vis->gx = thing->x;
|
||||||
vis->gy = thing->y;
|
vis->gy = thing->y;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue