Legacy GL: sprites support demo skin silhouettes

Code more closely matches R_GetSpriteTranslation
This commit is contained in:
James R 2024-03-25 04:01:23 -07:00
parent 1be8e6a762
commit c0c1400f98

View file

@ -5072,38 +5072,26 @@ static void HWR_ProjectSprite(mobj_t *thing)
vis->mobj = thing;
INT32 skinnum = TC_DEFAULT;
if (vis->mobj->skin && vis->mobj->sprite == SPR_PLAY) // This thing is a player!
{
skinnum = (skin_t*)vis->mobj->skin-skins;
}
// Hide not-yet-unlocked characters in replays from other people
if (skinnum >= 0 && !R_CanShowSkinInDemo(skinnum))
{
vis->colormap = R_GetTranslationColormap(TC_BLINK, thing->color, GTC_CACHE);
}
//Hurdler: 25/04/2000: now support colormap in hardware mode
if (R_ThingIsFlashing(vis->mobj))
else if (R_ThingIsFlashing(vis->mobj))
{
vis->colormap = R_GetTranslationColormap(TC_HITLAG, 0, GTC_CACHE);
}
/*
else 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->type == MT_CYBRAKDEMON || vis->mobj->colorized)
vis->colormap = R_GetTranslationColormap(TC_ALLWHITE, 0, GTC_CACHE);
else if (vis->mobj->type == MT_METALSONIC_BATTLE)
vis->colormap = R_GetTranslationColormap(TC_METALSONIC, 0, GTC_CACHE);
else
vis->colormap = R_GetTranslationColormap(TC_BOSS, 0, GTC_CACHE);
}
*/
else if (thing->color)
{
// New colormap stuff for skins Tails 06-07-2002
if (thing->colorized)
{
vis->colormap = R_GetTranslationColormap(TC_RAINBOW, thing->color, GTC_CACHE);
}
else if (thing->skin && thing->sprite == SPR_PLAY) // This thing is a player!
{
size_t skinnum = (skin_t*)thing->skin-skins;
vis->colormap = R_GetTranslationColormap((INT32)skinnum, thing->color, GTC_CACHE);
}
else
{
vis->colormap = R_GetTranslationColormap(TC_DEFAULT, vis->mobj->color ? vis->mobj->color : SKINCOLOR_GREEN, GTC_CACHE);
}
vis->colormap = R_GetTranslationColormap(thing->colorized ? TC_RAINBOW : skinnum, thing->color, GTC_CACHE);
}
else
{