Sources/CryGame C++/Solution1/CryGame/ScriptObjectPlayer.cpp
//////////////////////////////////////////////////////////////////////
//	sets speeds multiplyers for AI puppets

sets speeds multiplyers for AI puppets
sets speeds multiplyers for AI puppets
int CScriptObjectPlayer::SetAISpeedMult(IFunctionHandler *pH)
{
	CHECK_PARAMETERS(1);
	_SmartScriptObject pObj(m_pScriptSystem,true);
	if(pH->GetParam(1,pObj))
	{
		pObj->BeginSetGetChain();
		float run = 0.0f; 
		float crouch = 0.0f; 
		float prone = 0.0f;  
		float xrun = 0.0f;  
		float xwalk = 0.0f;  
		float rrun = 0.0f;  
		float rwalk = 0.0f; 		
		pObj->GetValueChain("run",run);
		pObj->GetValueChain("crouch",crouch);
		pObj->GetValueChain("prone",prone);
		pObj->GetValueChain("xrun",xrun);
		pObj->GetValueChain("xwalk",xwalk);
		pObj->GetValueChain("rrun",rrun);
		pObj->GetValueChain("rwalk",rwalk);
		pObj->EndSetGetChain();
		m_pPlayer->SetSpeedMult( run, crouch, prone, xrun, xwalk, rrun, rwalk );
	}
	return pH->EndFunction();
}
int CScriptObjectPlayer :: SetAISpeedMult ( IFunctionHandler * pH ) { CHECK_PARAMETERS ( 1 ) ; _SmartScriptObject pObj ( m_pScriptSystem , true ) ; if ( pH -> GetParam ( 1 , pObj ) ) { pObj -> BeginSetGetChain ( ) ; float run = 0.0f ; float crouch = 0.0f ; float prone = 0.0f ; float xrun = 0.0f ; float xwalk = 0.0f ; float rrun = 0.0f ; float rwalk = 0.0f ; pObj -> GetValueChain ( " " , run ) ; pObj -> GetValueChain ( " " , crouch ) ; pObj -> GetValueChain ( " " , prone ) ; pObj -> GetValueChain ( " " , xrun ) ; pObj -> GetValueChain ( " " , xwalk ) ; pObj -> GetValueChain ( " " , rrun ) ; pObj -> GetValueChain ( " " , rwalk ) ; pObj -> EndSetGetChain ( ) ; m_pPlayer -> SetSpeedMult ( run , crouch , prone , xrun , xwalk , rrun , rwalk ) ; } return pH -> EndFunction ( ) ; }
sets speeds multiplyers for AI puppets
sets speeds multiplyers for AI puppets