3 private const float TIME_TO_REPEAT = 0.05;
5 override void CreateActionComponent()
24 override void CreateConditionComponents()
35 if( item.GetQuantity() <= 0 )
38 Car car = Car.Cast( target.GetObject() );
42 if( car.GetFluidFraction(
CarFluid.BRAKE ) >= 0.98 )
45 float distance =
Math.AbsFloat(
vector.Distance(car.GetPosition(), player.GetPosition()));
48 if( distance <= carS.GetActionDistanceFuel() )
51 target.GetObject().GetActionComponentNameList(target.GetComponentIndex(), selections);
53 for (
int s = 0; s < selections.Count(); s++)
55 if ( selections[s] == carS.GetActionCompNameBrakes() )
64 override void OnEndAnimationLoopServer(
ActionData action_data )
66 if ( action_data.m_MainItem && action_data.m_MainItem.GetQuantity() <= 0.01 )
68 action_data.m_MainItem.SetQuantity(0);