Don't wait for pain tinting to subside when changing a base palette.

This means that when e.g. emerging from water hurt will change the
palette instantly, but because bit 16 is added to the P_SetGamePalette
call, the tinting is retained.

git-svn-id: https://svn.eduke32.com/eduke32@2303 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
helixhorned 2012-01-30 21:18:59 +00:00
parent 021126045f
commit 04e19dd942

View file

@ -2650,14 +2650,15 @@ void G_DisplayRest(int32_t smoothratio)
g_restorePalette = 1; // JBF 20040101
applyTint = 1;
}
// reset a normal palette
else if (g_restorePalette)
if (g_restorePalette)
{
static uint32_t omovethingscnt;
if (g_restorePalette < 2 || omovethingscnt+1 == g_moveThingsCount)
{
P_SetGamePalette(pp,pp->palette,2);
P_SetGamePalette(pp,pp->palette,2+16);
g_restorePalette = 0;
}
else
@ -2667,12 +2668,13 @@ void G_DisplayRest(int32_t smoothratio)
}
}
// loogies courtesy of being snotted on
else if (pp->loogcnt > 0)
else if (pp->pals.f==0 && pp->loogcnt > 0)
{
palette_t lp = { 0, 64, 0, pp->loogcnt>>1 };
Bmemcpy(&tempFade, &lp, sizeof(palette_t));
applyTint = 1;
}
if (tempFade.f > tempTint.f)
Bmemcpy(&tempTint, &tempFade, sizeof(palette_t));