From ec995b68c90aca63d4935051d38e9b921a0125a5 Mon Sep 17 00:00:00 2001 From: Blixibon Date: Mon, 15 Mar 2021 21:37:02 -0500 Subject: [PATCH] Added keyvalue/input to set suit zoom FOV in logic_playerproxy --- sp/src/game/server/hl2/hl2_player.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sp/src/game/server/hl2/hl2_player.cpp b/sp/src/game/server/hl2/hl2_player.cpp index f249c3e6..fe523806 100644 --- a/sp/src/game/server/hl2/hl2_player.cpp +++ b/sp/src/game/server/hl2/hl2_player.cpp @@ -278,6 +278,7 @@ public: CUtlDict m_QueuedKV; int m_MaxArmor = 100; + int m_SuitZoomFOV = 25; #endif bool PassesDamageFilter( const CTakeDamageInfo &info ); @@ -1760,7 +1761,11 @@ void CHL2_Player::ToggleZoom(void) //----------------------------------------------------------------------------- void CHL2_Player::StartZooming( void ) { +#ifdef MAPBASE + int iFOV = GetPlayerProxy() ? GetPlayerProxy()->m_SuitZoomFOV : 25; +#else int iFOV = 25; +#endif if ( SetFOV( this, iFOV, 0.4f ) ) { m_HL2Local.m_bZooming = true; @@ -4615,6 +4620,7 @@ BEGIN_DATADESC( CLogicPlayerProxy ) DEFINE_INPUTFUNC( FIELD_STRING, "SetPlayerModel", InputSetPlayerModel ), DEFINE_INPUTFUNC( FIELD_BOOLEAN, "SetPlayerDrawExternally", InputSetPlayerDrawExternally ), DEFINE_INPUT( m_MaxArmor, FIELD_INTEGER, "SetMaxInputArmor" ), + DEFINE_INPUT( m_SuitZoomFOV, FIELD_INTEGER, "SetSuitZoomFOV" ), #endif DEFINE_FIELD( m_hPlayer, FIELD_EHANDLE ), END_DATADESC()