diff options
Diffstat (limited to 'mp/src/game/client/hl2/hud_weaponselection.cpp')
| -rw-r--r-- | mp/src/game/client/hl2/hud_weaponselection.cpp | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/mp/src/game/client/hl2/hud_weaponselection.cpp b/mp/src/game/client/hl2/hud_weaponselection.cpp index 3d857e99..9d223169 100644 --- a/mp/src/game/client/hl2/hud_weaponselection.cpp +++ b/mp/src/game/client/hl2/hud_weaponselection.cpp @@ -451,6 +451,17 @@ void CHudWeaponSelection::Paint() if ( !pSelectedWeapon ) return; + bool bPushedViewport = false; + if( hud_fastswitch.GetInt() == HUDTYPE_FASTSWITCH || hud_fastswitch.GetInt() == HUDTYPE_PLUS ) + { + CMatRenderContextPtr pRenderContext( materials ); + if( pRenderContext->GetRenderTarget() ) + { + surface()->PushFullscreenViewport(); + bPushedViewport = true; + } + } + // interpolate the selected box size between the small box size and the large box size // interpolation has been removed since there is no weapon pickup animation anymore, so it's all at the largest size float percentageDone = 1.0f; //min(1.0f, (gpGlobals->curtime - m_flPickupStartTime) / m_flWeaponPickupGrowTime); @@ -727,6 +738,11 @@ void CHudWeaponSelection::Paint() } break; } + + if( bPushedViewport ) + { + surface()->PopFullscreenViewport(); + } } @@ -1025,8 +1041,6 @@ void CHudWeaponSelection::ApplySchemeSettings(vgui::IScheme *pScheme) { SetBounds( x, y, screenWide - x, screenTall - y ); } - - SetForceStereoRenderToFrameBuffer( true ); } //----------------------------------------------------------------------------- |