diff --git a/sp/src/game/client/c_baseanimating.cpp b/sp/src/game/client/c_baseanimating.cpp index 7e63a6bbe29..f74f4107a90 100644 --- a/sp/src/game/client/c_baseanimating.cpp +++ b/sp/src/game/client/c_baseanimating.cpp @@ -1468,7 +1468,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]; @@ -6054,7 +6054,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 ea23d800ff0..153b5eb15c4 100644 --- a/sp/src/game/client/cdll_client_int.cpp +++ b/sp/src/game/client/cdll_client_int.cpp @@ -967,7 +967,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 );