Skip to content
Snippets Groups Projects
Commit 73758f50 authored by toaster's avatar toaster
Browse files

Fix dropshadows of papersprites drifting depending on angle relative to...

Fix dropshadows of papersprites drifting depending on angle relative to camera. Discovered in Kart internal for the paper item drops and ported back, hence the branch name.
parent d380405b
No related branches found
No related tags found
1 merge request!1408Papersprite dropshadows no longer askance
......@@ -1423,7 +1423,7 @@ static void R_ProjectSprite(mobj_t *thing)
fixed_t sheartan = 0;
fixed_t shadowscale = FRACUNIT;
fixed_t basetx; // drop shadows
fixed_t basetx, basetz; // drop shadows
boolean shadowdraw, shadoweffects, shadowskew;
boolean splat = R_ThingIsFloorSprite(thing);
......@@ -1453,7 +1453,7 @@ static void R_ProjectSprite(mobj_t *thing)
tr_x = thing->x - viewx;
tr_y = thing->y - 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?
if (!papersprite && (tz < FixedMul(MINZ, this_scale))) // papersprite clipping is handled later
......@@ -2052,7 +2052,7 @@ static void R_ProjectSprite(mobj_t *thing)
R_SplitSprite(vis);
if (oldthing->shadowscale && cv_shadow.value)
R_ProjectDropShadow(oldthing, vis, oldthing->shadowscale, basetx, tz);
R_ProjectDropShadow(oldthing, vis, oldthing->shadowscale, basetx, basetz);
// Debug
++objectsdrawn;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment