diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Tests/SceneObjectCrossingTests.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Tests/SceneObjectCrossingTests.cs | 37 |
1 files changed, 21 insertions, 16 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectCrossingTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectCrossingTests.cs index e1e973c..abf8c48 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectCrossingTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectCrossingTests.cs | |||
@@ -157,29 +157,28 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
157 | 157 | ||
158 | // Cross | 158 | // Cross |
159 | sceneA.SceneGraph.UpdatePrimGroupPosition( | 159 | sceneA.SceneGraph.UpdatePrimGroupPosition( |
160 | so1.LocalId, new Vector3(so1StartPos.X, so1StartPos.Y - 20, so1StartPos.Z), userId); | 160 | so1.LocalId, new Vector3(so1StartPos.X, so1StartPos.Y - 20, so1StartPos.Z), sp1SceneA.ControllingClient); |
161 | 161 | ||
162 | // crossing is async | 162 | // crossing is async |
163 | Thread.Sleep(500); | 163 | Thread.Sleep(500); |
164 | 164 | ||
165 | SceneObjectGroup so1PostCross; | 165 | SceneObjectGroup so1PostCross; |
166 | 166 | ||
167 | { | 167 | ScenePresence sp1SceneAPostCross = sceneA.GetScenePresence(userId); |
168 | ScenePresence sp1SceneAPostCross = sceneA.GetScenePresence(userId); | 168 | Assert.IsTrue(sp1SceneAPostCross.IsChildAgent, "sp1SceneAPostCross.IsChildAgent unexpectedly false"); |
169 | Assert.IsTrue(sp1SceneAPostCross.IsChildAgent, "sp1SceneAPostCross.IsChildAgent unexpectedly false"); | ||
170 | 169 | ||
171 | ScenePresence sp1SceneBPostCross = sceneB.GetScenePresence(userId); | 170 | ScenePresence sp1SceneBPostCross = sceneB.GetScenePresence(userId); |
172 | TestClient sceneBTc = ((TestClient)sp1SceneBPostCross.ControllingClient); | 171 | TestClient sceneBTc = ((TestClient)sp1SceneBPostCross.ControllingClient); |
173 | sceneBTc.CompleteMovement(); | 172 | sceneBTc.CompleteMovement(); |
174 | 173 | ||
175 | Assert.IsFalse(sp1SceneBPostCross.IsChildAgent, "sp1SceneAPostCross.IsChildAgent unexpectedly true"); | 174 | Assert.IsFalse(sp1SceneBPostCross.IsChildAgent, "sp1SceneAPostCross.IsChildAgent unexpectedly true"); |
176 | Assert.IsTrue(sp1SceneBPostCross.IsSatOnObject); | 175 | Assert.IsTrue(sp1SceneBPostCross.IsSatOnObject); |
176 | |||
177 | Assert.IsNull(sceneA.GetSceneObjectGroup(so1Id), "uck"); | ||
178 | so1PostCross = sceneB.GetSceneObjectGroup(so1Id); | ||
179 | Assert.NotNull(so1PostCross); | ||
180 | Assert.AreEqual(1, so1PostCross.GetSittingAvatarsCount()); | ||
177 | 181 | ||
178 | Assert.IsNull(sceneA.GetSceneObjectGroup(so1Id), "uck"); | ||
179 | so1PostCross = sceneB.GetSceneObjectGroup(so1Id); | ||
180 | Assert.NotNull(so1PostCross); | ||
181 | Assert.AreEqual(1, so1PostCross.GetSittingAvatarsCount()); | ||
182 | } | ||
183 | 182 | ||
184 | Vector3 so1PostCrossPos = so1PostCross.AbsolutePosition; | 183 | Vector3 so1PostCrossPos = so1PostCross.AbsolutePosition; |
185 | 184 | ||
@@ -187,7 +186,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
187 | 186 | ||
188 | // Recross | 187 | // Recross |
189 | sceneB.SceneGraph.UpdatePrimGroupPosition( | 188 | sceneB.SceneGraph.UpdatePrimGroupPosition( |
190 | so1PostCross.LocalId, new Vector3(so1PostCrossPos.X, so1PostCrossPos.Y + 20, so1PostCrossPos.Z), userId); | 189 | so1PostCross.LocalId, new Vector3(so1PostCrossPos.X, so1PostCrossPos.Y + 20, so1PostCrossPos.Z), sp1SceneBPostCross.ControllingClient); |
191 | 190 | ||
192 | // crossing is async | 191 | // crossing is async |
193 | Thread.Sleep(500); | 192 | Thread.Sleep(500); |
@@ -255,13 +254,19 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
255 | lmmA.EventManagerOnNoLandDataFromStorage(); | 254 | lmmA.EventManagerOnNoLandDataFromStorage(); |
256 | lmmB.EventManagerOnNoLandDataFromStorage(); | 255 | lmmB.EventManagerOnNoLandDataFromStorage(); |
257 | 256 | ||
257 | AgentCircuitData acd = SceneHelpers.GenerateAgentData(userId); | ||
258 | TestClient tc = new TestClient(acd, sceneA); | ||
259 | List<TestClient> destinationTestClients = new List<TestClient>(); | ||
260 | EntityTransferHelpers.SetupInformClientOfNeighbourTriggersNeighbourClientCreate(tc, destinationTestClients); | ||
261 | ScenePresence sp1SceneA = SceneHelpers.AddScenePresence(sceneA, tc, acd); | ||
262 | |||
258 | SceneObjectGroup so1 = SceneHelpers.AddSceneObject(sceneA, 1, userId, "", sceneObjectIdTail); | 263 | SceneObjectGroup so1 = SceneHelpers.AddSceneObject(sceneA, 1, userId, "", sceneObjectIdTail); |
259 | UUID so1Id = so1.UUID; | 264 | UUID so1Id = so1.UUID; |
260 | so1.AbsolutePosition = new Vector3(128, 10, 20); | 265 | so1.AbsolutePosition = new Vector3(128, 10, 20); |
261 | 266 | ||
262 | // Cross with a negative value. We must make this call rather than setting AbsolutePosition directly | 267 | // Cross with a negative value. We must make this call rather than setting AbsolutePosition directly |
263 | // because only this will execute permission checks in the source region. | 268 | // because only this will execute permission checks in the source region. |
264 | sceneA.SceneGraph.UpdatePrimGroupPosition(so1.LocalId, new Vector3(128, -10, 20), userId); | 269 | sceneA.SceneGraph.UpdatePrimGroupPosition(so1.LocalId, new Vector3(128, -10, 20), sp1SceneA.ControllingClient); |
265 | 270 | ||
266 | // crossing is async | 271 | // crossing is async |
267 | Thread.Sleep(500); | 272 | Thread.Sleep(500); |