Fixed extra player translations not working in Heretic with predefined color sets

This commit is contained in:
Player701 2020-09-22 17:34:05 +03:00 committed by Christoph Oelckers
parent 58f56bbea6
commit ec3cd68c1f

View file

@ -474,21 +474,6 @@ static void R_CreatePlayerTranslation (float h, float s, float v, const FPlayerC
HSVtoRGB (&r, &g, &b, h, s, v); HSVtoRGB (&r, &g, &b, h, s, v);
SetRemap(table, i, r, g, b); SetRemap(table, i, r, g, b);
} }
// Build rain/lifegem translation
if (alttable)
{
bases = MIN (bases*1.3f, 1.f);
basev = MIN (basev*1.3f, 1.f);
for (i = 145; i <= 168; i++)
{
s = MIN (bases, 0.8965f - 0.0962f*(float)(i - 161));
v = MIN (1.f, (0.2102f + 0.0489f*(float)(i - 144)) * basev);
HSVtoRGB (&r, &g, &b, h, s, v);
SetRemap(alttable, i, r, g, b);
SetPillarRemap(pillartable, i, h, s, v);
}
}
} }
else if (gameinfo.gametype == GAME_Hexen) else if (gameinfo.gametype == GAME_Hexen)
{ {
@ -522,7 +507,24 @@ static void R_CreatePlayerTranslation (float h, float s, float v, const FPlayerC
} }
} }
} }
if (gameinfo.gametype == GAME_Hexen && alttable != NULL)
if (alttable != NULL)
{
if (gameinfo.gametype == GAME_Heretic)
{
// Build rain/lifegem translation
bases = MIN(bases * 1.3f, 1.f);
basev = MIN(basev * 1.3f, 1.f);
for (i = 145; i <= 168; i++)
{
s = MIN(bases, 0.8965f - 0.0962f * (float)(i - 161));
v = MIN(1.f, (0.2102f + 0.0489f * (float)(i - 144)) * basev);
HSVtoRGB(&r, &g, &b, h, s, v);
SetRemap(alttable, i, r, g, b);
SetPillarRemap(pillartable, i, h, s, v);
}
}
else if (gameinfo.gametype == GAME_Hexen)
{ {
// Build Hexen's lifegem translation. // Build Hexen's lifegem translation.
@ -548,6 +550,9 @@ static void R_CreatePlayerTranslation (float h, float s, float v, const FPlayerC
} }
} }
}
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
// //
// //