Use tracer's color for uncolored objects flagged with MF2_LINKDRAW

This commit is contained in:
lachablock 2021-07-06 18:56:45 +10:00
parent 7ea73bf817
commit 2e7141b54a
2 changed files with 8 additions and 2 deletions

View file

@ -5332,7 +5332,10 @@ static void HWR_ProjectSprite(mobj_t *thing)
vis->gpatch = (patch_t *)W_CachePatchNum(sprframe->lumppat[rot], PU_SPRITE); vis->gpatch = (patch_t *)W_CachePatchNum(sprframe->lumppat[rot], PU_SPRITE);
vis->mobj = thing; vis->mobj = thing;
vis->color = thing->color; if ((thing->flags2 & MF2_LINKDRAW) && thing->tracer && thing->color == SKINCOLOR_NONE)
vis->color = thing->tracer->color;
else
vis->color = thing->color;
//Hurdler: 25/04/2000: now support colormap in hardware mode //Hurdler: 25/04/2000: now support colormap in hardware mode
if ((vis->mobj->flags & (MF_ENEMY|MF_BOSS)) && (vis->mobj->flags2 & MF2_FRET) && !(vis->mobj->flags & MF_GRENADEBOUNCE) && (leveltime & 1)) // Bosses "flash" if ((vis->mobj->flags & (MF_ENEMY|MF_BOSS)) && (vis->mobj->flags2 & MF2_FRET) && !(vis->mobj->flags & MF_GRENADEBOUNCE) && (leveltime & 1)) // Bosses "flash"

View file

@ -1962,7 +1962,10 @@ static void R_ProjectSprite(mobj_t *thing)
vis->shear.offset = 0; vis->shear.offset = 0;
vis->mobj = thing; // Easy access! Tails 06-07-2002 vis->mobj = thing; // Easy access! Tails 06-07-2002
vis->color = oldthing->color; if ((oldthing->flags2 & MF2_LINKDRAW) && oldthing->tracer && oldthing->color == SKINCOLOR_NONE)
vis->color = oldthing->tracer->color;
else
vis->color = oldthing->color;
vis->x1 = x1 < portalclipstart ? portalclipstart : x1; vis->x1 = x1 < portalclipstart ? portalclipstart : x1;
vis->x2 = x2 >= portalclipend ? portalclipend-1 : x2; vis->x2 = x2 >= portalclipend ? portalclipend-1 : x2;