mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-27 20:41:46 +00:00
Fixed papersprites' shadows drifting - notably applies to Minecraft items.
This commit is contained in:
parent
1858811fbc
commit
36099a900f
1 changed files with 3 additions and 3 deletions
|
|
@ -1404,7 +1404,7 @@ static void R_ProjectSprite(mobj_t *thing)
|
||||||
fixed_t scalestep;
|
fixed_t scalestep;
|
||||||
fixed_t offset, offset2;
|
fixed_t offset, offset2;
|
||||||
|
|
||||||
fixed_t basetx; // drop shadows
|
fixed_t basetx, basetz; // drop shadows
|
||||||
|
|
||||||
boolean papersprite = !!(thing->frame & FF_PAPERSPRITE);
|
boolean papersprite = !!(thing->frame & FF_PAPERSPRITE);
|
||||||
fixed_t paperoffset = 0, paperdistance = 0; angle_t centerangle = 0;
|
fixed_t paperoffset = 0, paperdistance = 0; angle_t centerangle = 0;
|
||||||
|
|
@ -1445,7 +1445,7 @@ static void R_ProjectSprite(mobj_t *thing)
|
||||||
tr_x = thingxpos - viewx;
|
tr_x = thingxpos - viewx;
|
||||||
tr_y = thingypos - viewy;
|
tr_y = thingypos - viewy;
|
||||||
|
|
||||||
tz = FixedMul(tr_x, viewcos) + FixedMul(tr_y, viewsin); // near/far distance
|
basetz = tz = FixedMul(tr_x, viewcos) + FixedMul(tr_y, viewsin); // near/far distance
|
||||||
|
|
||||||
// thing is behind view plane?
|
// thing is behind view plane?
|
||||||
if (!papersprite && (tz < FixedMul(MINZ, this_scale))) // papersprite clipping is handled later
|
if (!papersprite && (tz < FixedMul(MINZ, this_scale))) // papersprite clipping is handled later
|
||||||
|
|
@ -1911,7 +1911,7 @@ static void R_ProjectSprite(mobj_t *thing)
|
||||||
R_SplitSprite(vis);
|
R_SplitSprite(vis);
|
||||||
|
|
||||||
if (oldthing->shadowscale && cv_shadow.value)
|
if (oldthing->shadowscale && cv_shadow.value)
|
||||||
R_ProjectDropShadow(oldthing, vis, oldthing->shadowscale, basetx, tz);
|
R_ProjectDropShadow(oldthing, vis, oldthing->shadowscale, basetx, basetz);
|
||||||
|
|
||||||
// Debug
|
// Debug
|
||||||
++objectsdrawn;
|
++objectsdrawn;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue