When loading a map and in a few other places, reset screen tinting.

git-svn-id: https://svn.eduke32.com/eduke32@2306 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
helixhorned 2012-02-02 17:34:16 +00:00
parent 20741efd3b
commit 15c7460059
5 changed files with 7 additions and 5 deletions

View file

@ -2658,7 +2658,8 @@ void G_DisplayRest(int32_t smoothratio)
if (g_restorePalette < 2 || omovethingscnt+1 == g_moveThingsCount) if (g_restorePalette < 2 || omovethingscnt+1 == g_moveThingsCount)
{ {
P_SetGamePalette(pp,pp->palette,2+16); // g_restorePalette < 0: reset tinting, too (e.g. when loading new game)
P_SetGamePalette(pp,pp->palette, 2 + (g_restorePalette>0)*16);
g_restorePalette = 0; g_restorePalette = 0;
} }
else else
@ -7443,7 +7444,7 @@ void G_HandleLocalKeys(void)
CONTROL_ClearButton(gamefunc_See_Coop_View); CONTROL_ClearButton(gamefunc_See_Coop_View);
screenpeek = connectpoint2[screenpeek]; screenpeek = connectpoint2[screenpeek];
if (screenpeek == -1) screenpeek = 0; if (screenpeek == -1) screenpeek = 0;
g_restorePalette = 1; g_restorePalette = -1;
} }
if ((g_netServer || ud.multimode > 1) && BUTTON(gamefunc_Show_Opponents_Weapon)) if ((g_netServer || ud.multimode > 1) && BUTTON(gamefunc_Show_Opponents_Weapon))

View file

@ -3348,7 +3348,7 @@ cheat_for_port_credits:
} }
else onvideomodechange(nbpp > 8); else onvideomodechange(nbpp > 8);
g_restorePalette = 1; g_restorePalette = -1;
G_UpdateScreenArea(); G_UpdateScreenArea();
setrendermode(nrend); setrendermode(nrend);

View file

@ -733,7 +733,7 @@ void onvideomodechange(int32_t newmode)
#endif #endif
setbrightness(ud.brightness>>2, palid, 0); setbrightness(ud.brightness>>2, palid, 0);
g_restorePalette = 1; g_restorePalette = -1;
g_crosshairSum = 0; g_crosshairSum = 0;
} }

View file

@ -2099,7 +2099,7 @@ int32_t G_EnterLevel(int32_t g)
for (i=g_numInterpolations-1; i>=0; i--) bakipos[i] = *curipos[i]; for (i=g_numInterpolations-1; i>=0; i--) bakipos[i] = *curipos[i];
g_restorePalette = 1; g_restorePalette = -1;
// mmulti_flushpackets(); // mmulti_flushpackets();

View file

@ -2621,6 +2621,7 @@ static void postloadplayer(int32_t savegamep)
//3 //3
P_UpdateScreenPal(g_player[myconnectindex].ps); P_UpdateScreenPal(g_player[myconnectindex].ps);
g_restorePalette = -1;
//3.5 //3.5
if (savegamep) if (savegamep)