Also apply player fading to followers

This commit is contained in:
NepDisk 2026-01-24 15:26:23 -05:00
parent 90fdec38dc
commit 96e81b1807

View file

@ -3874,9 +3874,19 @@ fixed_t R_GetThingFade(mobj_t *thing)
{
fixed_t fadealpha = FRACUNIT;
if (!cv_playerfade.value || leveltime < starttime-(3*TICRATE) || !thing->player || thing->player == viewplayer)
if (!cv_playerfade.value || leveltime < starttime-(3*TICRATE))
return fadealpha;
if (thing->type == MT_PLAYER)
{
if (!thing->player || thing->player == viewplayer)
return fadealpha;
}
else if (thing->type != MT_FOLLOWER && thing->type != MT_FOLLOWERBUBBLE_BACK && thing->type != MT_FOLLOWERBUBBLE_FRONT)
{
return fadealpha;
}
const INT32 playerdist = (FixedMul((thing->x - viewx), viewcos) + FixedMul((thing->y - viewy), viewsin)) >> FRACBITS;
const INT32 viewplayerdist = (FixedMul((viewplayer->mo->x - viewx), viewcos) + FixedMul((viewplayer->mo->y - viewy), viewsin)) >> FRACBITS;