From 799ed8253285ddbabcbd39d671a2ffe066efd8e2 Mon Sep 17 00:00:00 2001 From: Alug Date: Thu, 21 Nov 2024 02:11:40 +0100 Subject: [PATCH] try to make shadows not so offset on slopes with rotation enabled lmaos --- src/hardware/hw_main.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/hardware/hw_main.c b/src/hardware/hw_main.c index fe89574e6..a8f6e0c51 100644 --- a/src/hardware/hw_main.c +++ b/src/hardware/hw_main.c @@ -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);