Sources/CryGame C++/Solution1/CryGame/ScriptObjectPlayer.cpp
//////////////////////////////////////////////////////////////////////
//this function set the smoothing for the player input, was made for AIs but its also usable with players.

this function set the smoothing for the player input, was made for AIs but its also usable with players.
this function set the smoothing for the player input was made for AIs but its also usable with players .
int CScriptObjectPlayer::SetSmoothInput(IFunctionHandler *pH)
{
	float input_accel = 0;
	float input_stop_accel = 0;
	float input_accel_indoor = 0;
	float input_stop_accel_indoor = 0;
	if (pH->GetParamCount()>1)
	{
		pH->GetParam(1,input_accel);
		pH->GetParam(2,input_stop_accel);
	}
	if (pH->GetParamCount()>3 && m_pPlayer->IsAI())
	{
		pH->GetParam(3,input_accel_indoor);
		pH->GetParam(4,input_stop_accel_indoor);
	}
	m_pPlayer->m_input_accel = input_accel;
	m_pPlayer->m_input_stop_accel = input_stop_accel;
	m_pPlayer->m_input_accel_indoor = input_accel_indoor;
	m_pPlayer->m_input_stop_accel_indoor = input_stop_accel_indoor;
	return pH->EndFunction();
}
int CScriptObjectPlayer :: SetSmoothInput ( IFunctionHandler * pH ) { float input_accel = 0 ; float input_stop_accel = 0 ; float input_accel_indoor = 0 ; float input_stop_accel_indoor = 0 ; if ( pH -> GetParamCount ( ) > 1 ) { pH -> GetParam ( 1 , input_accel ) ; pH -> GetParam ( 2 , input_stop_accel ) ; } if ( pH -> GetParamCount ( ) > 3 && m_pPlayer -> IsAI ( ) ) { pH -> GetParam ( 3 , input_accel_indoor ) ; pH -> GetParam ( 4 , input_stop_accel_indoor ) ; } m_pPlayer -> m_input_accel = input_accel ; m_pPlayer -> m_input_stop_accel = input_stop_accel ; m_pPlayer -> m_input_accel_indoor = input_accel_indoor ; m_pPlayer -> m_input_stop_accel_indoor = input_stop_accel_indoor ; return pH -> EndFunction ( ) ; }
this function set the smoothing for the player input, was made for AIs but its also usable with players.
this function set the smoothing for the player input was made for AIs but its also usable with players .
//if more than 3 params there are special values for indoors, only for AI
