29 using System.Collections.Generic;
31 using NUnit.Framework;
33 using OpenSim.Framework;
34 using OpenSim.Region.CoreModules.Framework;
35 using OpenSim.Region.CoreModules.Framework.EntityTransfer;
36 using OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation;
37 using OpenSim.Region.CoreModules.World.Land;
38 using OpenSim.Region.OptionalModules;
39 using OpenSim.Tests.Common;
40 using System.Threading;
42 namespace OpenSim.
Region.Framework.Scenes.Tests
50 Util.FireAndForgetMethod = FireAndForgetMethod.RegressionTest;
59 Util.FireAndForgetMethod = Util.DefaultFireAndForgetMethod;
69 TestHelpers.InMethod();
72 UUID userId = TestHelpers.ParseTail(0x1);
73 int sceneObjectIdTail = 0x2;
79 IConfigSource config =
new IniConfigSource();
80 IConfig modulesConfig = config.AddConfig(
"Modules");
81 modulesConfig.Set(
"EntityTransferModule", etmA.Name);
82 modulesConfig.Set(
"SimulationServices", lscm.Name);
85 TestScene sceneA = sh.SetupScene(
"sceneA", TestHelpers.ParseTail(0x100), 1000, 1000);
86 TestScene sceneB = sh.SetupScene(
"sceneB", TestHelpers.ParseTail(0x200), 1000, 999);
88 SceneHelpers.SetupSceneModules(
new Scene[] { sceneA, sceneB }, config, lscm);
89 SceneHelpers.SetupSceneModules(sceneA, config, etmA);
90 SceneHelpers.SetupSceneModules(sceneB, config, etmB);
92 SceneObjectGroup so1 = SceneHelpers.AddSceneObject(sceneA, 1, userId,
"", sceneObjectIdTail);
93 UUID so1Id = so1.UUID;
94 so1.AbsolutePosition =
new Vector3(128, 10, 20);
97 so1.AbsolutePosition =
new Vector3(128, -10, 20);
102 Assert.IsNull(sceneA.GetSceneObjectGroup(so1Id));
103 Assert.NotNull(sceneB.GetSceneObjectGroup(so1Id));
116 TestHelpers.InMethod();
119 UUID userId = TestHelpers.ParseTail(0x1);
120 int sceneObjectIdTail = 0x2;
121 Vector3 so1StartPos =
new Vector3(128, 10, 20);
127 IConfigSource config =
new IniConfigSource();
128 IConfig modulesConfig = config.AddConfig(
"Modules");
129 modulesConfig.Set(
"EntityTransferModule", etmA.Name);
130 modulesConfig.Set(
"SimulationServices", lscm.Name);
131 IConfig entityTransferConfig = config.AddConfig(
"EntityTransfer");
135 entityTransferConfig.Set(
"wait_for_callback",
false);
138 TestScene sceneA = sh.SetupScene(
"sceneA", TestHelpers.ParseTail(0x100), 1000, 1000);
139 TestScene sceneB = sh.SetupScene(
"sceneB", TestHelpers.ParseTail(0x200), 1000, 999);
141 SceneHelpers.SetupSceneModules(
new Scene[] { sceneA, sceneB }, config, lscm);
145 SceneObjectGroup so1 = SceneHelpers.AddSceneObject(sceneA, 1, userId,
"", sceneObjectIdTail);
146 UUID so1Id = so1.UUID;
147 so1.AbsolutePosition = so1StartPos;
151 List<TestClient> destinationTestClients =
new List<TestClient>();
152 EntityTransferHelpers.SetupInformClientOfNeighbourTriggersNeighbourClientCreate(tc, destinationTestClients);
154 ScenePresence sp1SceneA = SceneHelpers.AddScenePresence(sceneA, tc, acd);
155 sp1SceneA.AbsolutePosition = so1StartPos;
156 sp1SceneA.HandleAgentRequestSit(sp1SceneA.ControllingClient, sp1SceneA.UUID, so1.UUID, Vector3.Zero);
159 sceneA.SceneGraph.UpdatePrimGroupPosition(
160 so1.LocalId,
new Vector3(so1StartPos.X, so1StartPos.Y - 20, so1StartPos.Z), userId);
168 ScenePresence sp1SceneAPostCross = sceneA.GetScenePresence(userId);
169 Assert.IsTrue(sp1SceneAPostCross.IsChildAgent,
"sp1SceneAPostCross.IsChildAgent unexpectedly false");
171 ScenePresence sp1SceneBPostCross = sceneB.GetScenePresence(userId);
173 sceneBTc.CompleteMovement();
175 Assert.IsFalse(sp1SceneBPostCross.IsChildAgent,
"sp1SceneAPostCross.IsChildAgent unexpectedly true");
176 Assert.IsTrue(sp1SceneBPostCross.IsSatOnObject);
178 Assert.IsNull(sceneA.GetSceneObjectGroup(so1Id),
"uck");
179 so1PostCross = sceneB.GetSceneObjectGroup(so1Id);
180 Assert.NotNull(so1PostCross);
181 Assert.AreEqual(1, so1PostCross.GetSittingAvatarsCount());
184 Vector3 so1PostCrossPos = so1PostCross.AbsolutePosition;
189 sceneB.SceneGraph.UpdatePrimGroupPosition(
190 so1PostCross.LocalId,
new Vector3(so1PostCrossPos.X, so1PostCrossPos.Y + 20, so1PostCrossPos.Z), userId);
196 ScenePresence sp1SceneBPostReCross = sceneB.GetScenePresence(userId);
197 Assert.IsTrue(sp1SceneBPostReCross.IsChildAgent,
"sp1SceneBPostReCross.IsChildAgent unexpectedly false");
199 ScenePresence sp1SceneAPostReCross = sceneA.GetScenePresence(userId);
201 sceneATc.CompleteMovement();
203 Assert.IsFalse(sp1SceneAPostReCross.IsChildAgent,
"sp1SceneAPostCross.IsChildAgent unexpectedly true");
204 Assert.IsTrue(sp1SceneAPostReCross.IsSatOnObject);
206 Assert.IsNull(sceneB.GetSceneObjectGroup(so1Id),
"uck2");
208 Assert.NotNull(so1PostReCross);
209 Assert.AreEqual(1, so1PostReCross.GetSittingAvatarsCount());
223 TestHelpers.InMethod();
226 UUID userId = TestHelpers.ParseTail(0x1);
227 int sceneObjectIdTail = 0x2;
235 IConfigSource config =
new IniConfigSource();
236 IConfig modulesConfig = config.AddConfig(
"Modules");
237 modulesConfig.Set(
"EntityTransferModule", etmA.Name);
238 modulesConfig.Set(
"SimulationServices", lscm.Name);
240 IConfig permissionsConfig = config.AddConfig(
"Permissions");
241 permissionsConfig.Set(
"permissionmodules",
"PrimLimitsModule");
244 TestScene sceneA = sh.SetupScene(
"sceneA", TestHelpers.ParseTail(0x100), 1000, 1000);
245 TestScene sceneB = sh.SetupScene(
"sceneB", TestHelpers.ParseTail(0x200), 1000, 999);
247 SceneHelpers.SetupSceneModules(
new Scene[] { sceneA, sceneB }, config, lscm);
248 SceneHelpers.SetupSceneModules(
250 SceneHelpers.SetupSceneModules(
255 lmmA.EventManagerOnNoLandDataFromStorage();
256 lmmB.EventManagerOnNoLandDataFromStorage();
258 SceneObjectGroup so1 = SceneHelpers.AddSceneObject(sceneA, 1, userId,
"", sceneObjectIdTail);
259 UUID so1Id = so1.UUID;
260 so1.AbsolutePosition =
new Vector3(128, 10, 20);
264 sceneA.SceneGraph.UpdatePrimGroupPosition(so1.LocalId,
new Vector3(128, -10, 20), userId);
269 Assert.IsNull(sceneA.GetSceneObjectGroup(so1Id));
270 Assert.NotNull(sceneB.GetSceneObjectGroup(so1Id));
void TestCrossOnSameSimulatorPrimLimitsOkay()
Test cross with no prim limit module.
Enables Prim limits for parcel.
A scene object group is conceptually an object in the scene. The object is constituted of SceneObject...
Circuit data for an agent. Connection information shared between regions that accept UDP connections ...
Helpers for setting up scenes.
void TestCrossOnSameSimulator()
Test cross with no prim limit module.
void TestCrossOnSameSimulatorWithSittingAvatar()
Test cross with no prim limit module.