class TeleportCommandHandler extends AICommandHandlerBase
{
	protected editable inlined var m_position : AIArgumentMapping;
	protected editable inlined var m_rotation : AIArgumentMapping;
	protected editable inlined var m_doNavTest : AIArgumentMapping;

	protected export override function Activate( context : ScriptExecutionContext )
	{
		SetUpdateInterval( context, RandomizeOffsetForUpdateInterval( 0.2 ) );
	}

	protected override function UpdateCommand( context : ScriptExecutionContext, command : AICommand ) : AIbehaviorUpdateOutcome
	{
		var typedCommand : AITeleportCommand;
		typedCommand = ( ( AITeleportCommand )( command ) );
		if( !( typedCommand ) )
		{
			return AIbehaviorUpdateOutcome.FAILURE;
		}
		if( ( !( CheckArgument( m_position, 'position' ) ) || !( CheckArgument( m_rotation, 'rotation' ) ) ) || !( CheckArgument( m_doNavTest, 'doNavTest' ) ) )
		{
			return AIbehaviorUpdateOutcome.FAILURE;
		}
		ScriptExecutionContext.SetMappingValue( context, m_position, typedCommand.position );
		ScriptExecutionContext.SetMappingValue( context, m_rotation, typedCommand.rotation );
		ScriptExecutionContext.SetMappingValue( context, m_doNavTest, typedCommand.doNavTest );
		return AIbehaviorUpdateOutcome.IN_PROGRESS;
	}

}

