class HitIsMovingPrereqState extends GenericHitPrereqState
{

	public override function Evaluate( hitEvent : gameHitEvent ) : Bool
	{
		var objectToCheck : weak< gamePuppet >;
		const var prereq : HitIsMovingPrereq;
		prereq = ( ( HitIsMovingPrereq )( GetPrereq() ) );
		objectToCheck = ( ( gamePuppet )( GetObjectToCheck( prereq.m_object, hitEvent ) ) );
		if( objectToCheck )
		{
			if( prereq.m_isMoving )
			{
				return Vector4.Length2D( objectToCheck.GetVelocity() ) > 0.40000001;
			}
			else
			{
				return Vector4.Length2D( objectToCheck.GetVelocity() ) <= 0.1;
			}
		}
		return false;
	}

}

class HitIsMovingPrereq extends GenericHitPrereq
{
	default m_isSync = true;
	default m_callbackType = gameDamageCallbackType.HitTriggered;
	default m_pipelineStage = gameDamagePipelineStage.Process;
	var m_isMoving : Bool;
	var m_object : String;

	protected override function Initialize( recordID : TweakDBID )
	{
		m_isMoving = TweakDBInterface.GetBool( recordID + T".isMoving", false );
		m_object = TweakDBInterface.GetString( recordID + T".object", "" );
	}

}

