Added keyvalue/input to set suit zoom FOV in logic_playerproxy

This commit is contained in:
Blixibon 2021-03-15 21:37:02 -05:00
parent 58bc8b7101
commit ec995b68c9

View File

@ -278,6 +278,7 @@ public:
CUtlDict<string_t, int> 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()