From 36839136fbcb41d7beecb3be252fd16f0f76877d Mon Sep 17 00:00:00 2001
From: Randy Heit <rheit@zdoom.fake>
Date: Tue, 23 Jan 2007 01:43:47 +0000
Subject: [PATCH] - Fixed: The simulated palette blends when the menu or
 console are open   were applied even when the status bar wasn't drawn. (In
 other words, even   in situations where a real palette blend wouldn't have
 happened.)

SVN r462 (trunk)
---
 docs/rh-log.txt   | 3 +++
 src/c_console.cpp | 2 +-
 src/m_menu.cpp    | 2 +-
 3 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/docs/rh-log.txt b/docs/rh-log.txt
index 97f42438c..c9bd98c30 100644
--- a/docs/rh-log.txt
+++ b/docs/rh-log.txt
@@ -1,4 +1,7 @@
 January 22, 2007
+- Fixed: The simulated palette blends when the menu or console are open
+  were applied even when the status bar wasn't drawn. (In other words, even
+  in situations where a real palette blend wouldn't have happened.)
 - Added a range check for the PNG grAb chunks.
 - Fixed: AddLine() could corrupt memory if the length of the text being
   added was longer than the console buffer.
diff --git a/src/c_console.cpp b/src/c_console.cpp
index 35137af6b..25c98a568 100644
--- a/src/c_console.cpp
+++ b/src/c_console.cpp
@@ -1222,7 +1222,7 @@ void C_DrawConsole ()
 			{
 				player = player->camera->player;
 			}
-			if (player->BlendA != 0)
+			if (player->BlendA != 0 && (gamestate == GS_LEVEL || gamestate == GS_TITLELEVEL))
 			{
 				screen->Dim (PalEntry ((unsigned char)(player->BlendR*255), (unsigned char)(player->BlendG*255), (unsigned char)(player->BlendB*255)),
 					player->BlendA, 0, ConBottom, screen->GetWidth(), screen->GetHeight() - ConBottom);
diff --git a/src/m_menu.cpp b/src/m_menu.cpp
index d7483fa38..08e8eab47 100644
--- a/src/m_menu.cpp
+++ b/src/m_menu.cpp
@@ -3085,7 +3085,7 @@ void M_Drawer ()
 	PalEntry fade = 0;
 
 	const player_t *player = &players[consoleplayer];
-	if (player->camera != NULL)
+	if (player->camera != NULL && (gamestate == GS_LEVEL || gamestate == GS_TITLELEVEL))
 	{
 		if (player->camera->player != NULL)
 		{