mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-15 09:11:48 +00:00
Make ring shadows smaller and fix scale bug
This commit is contained in:
parent
c078ab630d
commit
8757194d73
1 changed files with 5 additions and 1 deletions
|
@ -1161,6 +1161,10 @@ static void R_ProjectDropShadow(mobj_t *thing, vissprite_t *vis, fixed_t tx, fix
|
|||
|
||||
scalemul = FRACUNIT - floordiff/640;
|
||||
|
||||
//@TODO make this configurable instead of hardcoding to the ring
|
||||
if (thing->type == MT_RING)
|
||||
scalemul = scalemul*2/3;
|
||||
|
||||
patch = W_CachePatchNum(sprites[SPR_THOK].spriteframes[0].lumppat[0], PU_CACHE);
|
||||
xscale = FixedDiv(projection, tz);
|
||||
yscale = FixedDiv(projectiony, tz);
|
||||
|
@ -1214,7 +1218,7 @@ static void R_ProjectDropShadow(mobj_t *thing, vissprite_t *vis, fixed_t tx, fix
|
|||
shadow->gy = thing->y;
|
||||
shadow->gzt = shadow->pz + shadow->patch->height * shadowyscale / 2;
|
||||
shadow->gz = shadow->gzt - shadow->patch->height * shadowyscale;
|
||||
shadow->texturemid = FixedDiv(shadow->gzt - viewz, shadowyscale);
|
||||
shadow->texturemid = FixedMul(thing->scale, FixedDiv(shadow->gzt - viewz, shadowyscale));
|
||||
shadow->scalestep = 0;
|
||||
shadow->paperdistance = shadowskew; // repurposed variable
|
||||
|
||||
|
|
Loading…
Reference in a new issue