From dfbec673a4ca24ab683ea403361efa4372cc1e0d Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Fri, 28 Nov 2008 20:11:17 +0000 Subject: * simplify AddNewClient since making this root without using MakeRootAgent() no longer sets everything up properly --- OpenSim/Region/Environment/Scenes/Tests/SceneTestUtils.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/Environment/Scenes/Tests/SceneTestUtils.cs') diff --git a/OpenSim/Region/Environment/Scenes/Tests/SceneTestUtils.cs b/OpenSim/Region/Environment/Scenes/Tests/SceneTestUtils.cs index 468a4ad..b169d9a 100644 --- a/OpenSim/Region/Environment/Scenes/Tests/SceneTestUtils.cs +++ b/OpenSim/Region/Environment/Scenes/Tests/SceneTestUtils.cs @@ -97,9 +97,16 @@ namespace OpenSim.Region.Environment.Scenes.Tests agent.startpos = Vector3.Zero; agent.CapsPath = "http://wibble.com"; + // We emulate the proper login sequence here by doing things in three stages + // Stage 1: simulate login by telling the scene to expect a new user connection scene.NewUserConnection(agent); + + // Stage 2: add the new client as a child agent to the scene IClientAPI client = new TestClient(agent); - scene.AddNewClient(client, true); + scene.AddNewClient(client); + + // Stage 3: Invoke agent crossing, which converts the child agent into a root agent (with appearance, + // inventory, etc.) scene.AgentCrossing(agent.AgentID, new Vector3(90, 90, 90), false); return client; -- cgit v1.1