fix #45 - opening inventory negates black screen in walls

master
darkrose 2017-07-22 00:12:50 +10:00
parent 64737e32db
commit dd52f31933
1 changed files with 4 additions and 2 deletions

View File

@ -3226,8 +3226,6 @@ void ClientMap::renderPostFx()
if (m_client->getSleepAlpha() > 0) {
post_effect_color = video::SColor(m_client->getSleepAlpha(),0,0,0);
}else if (m_client->getFormState()) {
post_effect_color = video::SColor(128,0,0,0);
}else{
MapNode n = getNodeNoEx(floatToInt(camera_position, BS));
@ -3243,6 +3241,10 @@ void ClientMap::renderPostFx()
post_effect_color = video::SColor(255, 0, 0, 0);
}
}
if (m_client->getFormState()) {
if (post_effect_color.getAlpha() < 128)
post_effect_color = video::SColor(128,0,0,0);
}
if (post_effect_color.getAlpha() != 0) {
// Draw a full-screen rectangle
video::IVideoDriver* driver = SceneManager->getVideoDriver();