Sources/CryGame C++/Solution1/CryGame/ScriptObjectVehicle.cpp
//////////////////////////////////////////////////////////////////////////
/*! Retrieves the vehicles velocity
		@return velocity of the vehicle (float)
*/
Retrieves the vehicles velocity
@return velocity of the vehicle (float)
Retrieves the vehicles velocity @return velocity of the vehicle ( float )
int CScriptObjectVehicle::GetVehicleVelocity(IFunctionHandler *pH)
{
	pe_status_dynamics peStatus;
	CHECK_PARAMETERS(0);
	IEntity *pEntity=m_pVehicle->GetEntity();
	IPhysicalEntity *pPEnt=pEntity->GetPhysics();
	if(pPEnt)
		pPEnt->GetStatus(&peStatus);
	float fVelocity=peStatus.v.len(); 
	return pH->EndFunction(fVelocity);
}
int CScriptObjectVehicle :: GetVehicleVelocity ( IFunctionHandler * pH ) { pe_status_dynamics peStatus ; CHECK_PARAMETERS ( 0 ) ; IEntity * pEntity = m_pVehicle -> GetEntity ( ) ; IPhysicalEntity * pPEnt = pEntity -> GetPhysics ( ) ; if ( pPEnt ) pPEnt -> GetStatus ( & peStatus ) ; float fVelocity = peStatus . v . len ( ) ; return pH -> EndFunction ( fVelocity ) ; }
Retrieves the vehicles velocity
@return velocity of the vehicle (float)
Retrieves the vehicles velocity @return velocity of the vehicle ( float )
//.vel.len();
