Respect mobj->color while enemies & bosses flash

This commit is contained in:
lachablock 2021-05-22 16:52:01 +10:00
parent d9395b0a73
commit 4e5c3566c9
2 changed files with 5 additions and 1 deletions

View file

@ -481,8 +481,12 @@ static void R_GenerateTranslationColormap(UINT8 *dest_colormap, INT32 skinnum, U
// White! // White!
if (skinnum == TC_BOSS) if (skinnum == TC_BOSS)
{ {
UINT8 *originalColormap = R_GetTranslationColormap(TC_DEFAULT, (skincolornum_t)color, GTC_CACHE);
for (i = 0; i < 16; i++) for (i = 0; i < 16; i++)
{
dest_colormap[DEFAULT_STARTTRANSCOLOR + i] = originalColormap[DEFAULT_STARTTRANSCOLOR + i];
dest_colormap[31-i] = i; dest_colormap[31-i] = i;
}
} }
else if (skinnum == TC_METALSONIC) else if (skinnum == TC_METALSONIC)
{ {

View file

@ -753,7 +753,7 @@ UINT8 *R_GetSpriteTranslation(vissprite_t *vis)
else if (vis->mobj->type == MT_METALSONIC_BATTLE) else if (vis->mobj->type == MT_METALSONIC_BATTLE)
return R_GetTranslationColormap(TC_METALSONIC, 0, GTC_CACHE); return R_GetTranslationColormap(TC_METALSONIC, 0, GTC_CACHE);
else else
return R_GetTranslationColormap(TC_BOSS, 0, GTC_CACHE); return R_GetTranslationColormap(TC_BOSS, vis->mobj->color, GTC_CACHE);
} }
else if (vis->mobj->color) else if (vis->mobj->color)
{ {