class UncontrolledMovementEffector extends Effector
{
	var m_recordID : TweakDBID;

	protected override function Initialize( record : TweakDBID, game : GameInstance, parentRecord : TweakDBID )
	{
		m_recordID = record;
	}

	protected override function ActionOn( owner : GameObject )
	{
		var record : UncontrolledMovementEffector_Record;
		var startEvent : UncontrolledMovementStartEvent;
		var ownerPuppet : NPCPuppet;
		ownerPuppet = ( ( NPCPuppet )( owner ) );
		if( ScriptedPuppet.CanRagdoll( ownerPuppet ) )
		{
			startEvent = new UncontrolledMovementStartEvent;
			record = TweakDBInterface.GetUncontrolledMovementEffectorRecord( m_recordID );
			startEvent.ragdollNoGroundThreshold = record.RagdollNoGroundThreshold();
			startEvent.ragdollOnCollision = record.RagdollOnCollision();
			startEvent.DebugSetSourceName( record.DebugSourceName() );
			owner.QueueEvent( startEvent );
		}
	}

}

class SetRagdollComponentStateEffector extends Effector
{
	var m_state : Bool;

	protected override function Initialize( record : TweakDBID, game : GameInstance, parentRecord : TweakDBID )
	{
		m_state = TweakDBInterface.GetBool( record + T".state", false );
	}

	protected override function ActionOn( owner : GameObject )
	{
		var ownerPuppet : NPCPuppet;
		ownerPuppet = ( ( NPCPuppet )( owner ) );
		if( ownerPuppet )
		{
			ownerPuppet.SetDisableRagdoll( !( m_state ) );
		}
	}

}

