diff --git a/sp/src/game/client/c_baseanimating.cpp b/sp/src/game/client/c_baseanimating.cpp index 76677d78b36..790752522a8 100644 --- a/sp/src/game/client/c_baseanimating.cpp +++ b/sp/src/game/client/c_baseanimating.cpp @@ -1472,7 +1472,7 @@ float C_BaseAnimating::GetPoseParameter( int iPoseParameter ) if ( pStudioHdr->GetNumPoseParameters() < iPoseParameter ) return 0.0f; - if ( iPoseParameter < 0 ) + if ( iPoseParameter < 0 || iPoseParameter >= MAXSTUDIOPOSEPARAM ) return 0.0f; return m_flPoseParameter[iPoseParameter]; @@ -6089,7 +6089,7 @@ float C_BaseAnimating::SetPoseParameter( CStudioHdr *pStudioHdr, int iParameter, return flValue; } - if (iParameter >= 0) + if (iParameter >= 0 && iParameter < MAXSTUDIOPOSEPARAM) { float flNewValue; flValue = Studio_SetPoseParameter( pStudioHdr, iParameter, flValue, flNewValue ); diff --git a/sp/src/game/client/cdll_client_int.cpp b/sp/src/game/client/cdll_client_int.cpp index bd23e18db95..9a923687288 100644 --- a/sp/src/game/client/cdll_client_int.cpp +++ b/sp/src/game/client/cdll_client_int.cpp @@ -1022,7 +1022,7 @@ int CHLClient::Init( CreateInterfaceFn appSystemFactory, CreateInterfaceFn physi if (!g_pMatSystemSurface) return false; - if ( !CommandLine()->CheckParm( "-noscripting") ) + if ( !CommandLine()->CheckParm( "-noscripting" ) && !CommandLine()->CheckParm( "-noscripting_client" ) ) { scriptmanager = (IScriptManager *)appSystemFactory( VSCRIPT_INTERFACE_VERSION, NULL );