try to make shadows not so offset on slopes with rotation enabled

lmaos
This commit is contained in:
Alug committed 2024-11-21 02:11:40 +01:00
1 parent 0e55d4018a
commit 799ed82532
1 file changed
+8
+8
View File
@@ -4687,6 +4687,14 @@ static void HWR_ProjectSprite(mobj_t *thing)
else
rollsum = rollangle;
// this is kinda dumb lkmao, but try to mitigate shadows being weirdly offset on slopes
if (thing->type == MT_SHADOW)
{
sprinfo->available = true; // < lmao
sprinfo->pivot[(thing->frame & FF_FRAMEMASK)].x = spr_offset>>FRACBITS;
sprinfo->pivot[(thing->frame & FF_FRAMEMASK)].y = -8; // noones gonna replace shadow sprite anyways, right? that random value ftw, otherwise this clips into the ground Zzz...
}
rollangle = R_GetRollAngle(rollsum);
rotsprite = Patch_GetRotatedSprite(sprframe, (thing->frame & FF_FRAMEMASK), rot, flip, false, sprinfo, rollangle);