From 1659c2e75332ca4e135ada40a3daad28c3c60e79 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 d0f3d17b7..e96c9e36a 100644 --- a/src/hardware/hw_main.c +++ b/src/hardware/hw_main.c @@ -4590,6 +4590,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);