mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-11 07:11:39 +00:00
Revert r2303 functionality ("Don't wait for pain tinting to subside...")
It was causing update issues when many tints were applied simultaneously, like being shot and spit at by enforcers while being on rails barefeet. Also, the GL modes were calling gltexinvalidate8() when picking up goodies or being hurt with that change, so it needs much more thought. git-svn-id: https://svn.eduke32.com/eduke32@2322 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
34000a9ed0
commit
75436815c3
1 changed files with 11 additions and 13 deletions
|
@ -2636,29 +2636,27 @@ void G_DisplayRest(int32_t smoothratio)
|
|||
}
|
||||
#endif // USE_OPENGL
|
||||
|
||||
{
|
||||
static int32_t lastpalsf; // HACK
|
||||
// {
|
||||
// static int32_t lastpalsf; // HACK
|
||||
|
||||
// this does pain tinting etc from the CON
|
||||
if ((pp->pals.f > 0 && pp->loogcnt == 0) || (lastpalsf>0 && pp->pals.f==0)) // JBF 20040101: pals.f > 0 now >= 0
|
||||
{
|
||||
Bmemcpy(&tempFade, &pp->pals, sizeof(palette_t));
|
||||
g_restorePalette = 1; // JBF 20040101
|
||||
applyTint = 1;
|
||||
}
|
||||
|
||||
lastpalsf = pp->pals.f;
|
||||
if ((pp->pals.f > 0 && pp->loogcnt == 0) /*|| (lastpalsf>0 && pp->pals.f==0)*/) // JBF 20040101: pals.f > 0 now >= 0
|
||||
{
|
||||
Bmemcpy(&tempFade, &pp->pals, sizeof(palette_t));
|
||||
g_restorePalette = 1; // JBF 20040101
|
||||
applyTint = 1;
|
||||
}
|
||||
|
||||
// lastpalsf = pp->pals.f;
|
||||
// }
|
||||
// reset a normal palette
|
||||
if (g_restorePalette)
|
||||
else if (g_restorePalette)
|
||||
{
|
||||
static uint32_t omovethingscnt;
|
||||
|
||||
if (g_restorePalette < 2 || omovethingscnt+1 == g_moveThingsCount)
|
||||
{
|
||||
// g_restorePalette < 0: reset tinting, too (e.g. when loading new game)
|
||||
P_SetGamePalette(pp,pp->palette, 2 + (g_restorePalette>0)*16);
|
||||
P_SetGamePalette(pp,pp->palette, 2 /*+ (g_restorePalette>0)*16*/);
|
||||
g_restorePalette = 0;
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue