/// <summary>
/// Introduce an agent into the scene by adding a new client.
/// </summary>
/// <returns>The scene presence added</returns>
/// <param name='scene'></param>
/// <param name='testClient'></param>
/// <param name='agentData'></param>
/// <param name='tf'></param>
private static ScenePresence IntroduceClientToScene(
Scene scene, IClientAPI client, AgentCircuitData agentData, TeleportFlags tf)
{
string reason;
// Stage 1: tell the scene to expect a new user connection
if (!scene.NewUserConnection(agentData, (uint)tf, null, out reason))
Console.WriteLine("NewUserConnection failed: " + reason);
// Stage 2: add the new client as a child agent to the scene
scene.AddNewAgent(client, PresenceType.User);
return scene.GetScenePresence(client.AgentId);
}