Added a slider to control the intensity of underwater screen blending.

This commit is contained in:
nashmuhandes 2016-11-11 17:18:39 +08:00
commit fd31c84745
3 changed files with 7 additions and 1 deletions

View file

@ -119,6 +119,7 @@ CUSTOM_CVAR(Int, am_showmaplabel, 2, CVAR_ARCHIVE)
}
CVAR (Bool, idmypos, false, 0);
CVAR(Float, underwater_fade_scalar, 1.0f, CVAR_ARCHIVE) // [Nash] user-settable underwater blend intensity
//---------------------------------------------------------------------------
//
@ -1544,7 +1545,10 @@ void DBaseStatusBar::DrawPowerups ()
void DBaseStatusBar::BlendView (float blend[4])
{
V_AddBlend (BaseBlendR / 255.f, BaseBlendG / 255.f, BaseBlendB / 255.f, BaseBlendA, blend);
// [Nash] Allow user to set blend intensity
float cnt = (BaseBlendA * underwater_fade_scalar);
V_AddBlend (BaseBlendR / 255.f, BaseBlendG / 255.f, BaseBlendB / 255.f, cnt, blend);
V_AddPlayerBlend(CPlayer, blend, 1.0f, 228);
if (screen->Accel2D || (CPlayer->camera != NULL && menuactive == MENU_Off && ConsoleState == c_up))