aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/CoreModules/Framework/InventoryAccess/Tests/InventoryAccessModuleTests.cs40
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs21
2 files changed, 20 insertions, 41 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/Tests/InventoryAccessModuleTests.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/Tests/InventoryAccessModuleTests.cs
index c76a30a..9fc77a7 100644
--- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/Tests/InventoryAccessModuleTests.cs
+++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/Tests/InventoryAccessModuleTests.cs
@@ -87,41 +87,13 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess.Tests
87// log4net.Config.XmlConfigurator.Configure(); 87// log4net.Config.XmlConfigurator.Configure();
88 88
89 // Create asset 89 // Create asset
90 SceneObjectGroup object1; 90 SceneObjectGroup object1 = SceneSetupHelpers.CreateSceneObject(1, m_userId, "Object1", 0x20);
91 { 91 object1.AbsolutePosition = new Vector3(15, 30, 45);
92 string partName = "Object1"; 92 object1.Parts[0].Scale = new Vector3(1, 1, 1);
93 UUID ownerId = UUID.Parse("00000000-0000-0000-0000-000000000040");
94 PrimitiveBaseShape shape = PrimitiveBaseShape.CreateSphere();
95 Vector3 groupPosition = new Vector3(10, 20, 30);
96 Quaternion rotationOffset = Quaternion.Identity;
97 Vector3 offsetPosition = new Vector3(5, 10, 15);
98
99 SceneObjectPart part1
100 = new SceneObjectPart(
101 ownerId, shape, groupPosition, rotationOffset, offsetPosition);
102 part1.Scale = new Vector3(1, 1, 1);
103 part1.Name = partName;
104
105 object1 = new SceneObjectGroup(part1);
106 }
107 93
108 SceneObjectGroup object2; 94 SceneObjectGroup object2 = SceneSetupHelpers.CreateSceneObject(1, m_userId, "Object2", 0x40);
109 { 95 object2.AbsolutePosition = new Vector3(25, 50, 75);
110 string partName = "Object2"; 96 object2.Parts[0].Scale = new Vector3(1, 1, 1);
111 UUID ownerId = UUID.Parse("00000000-0000-0000-0000-000000000040");
112 PrimitiveBaseShape shape = PrimitiveBaseShape.CreateSphere();
113 Vector3 groupPosition = new Vector3(20, 40, 60);
114 Quaternion rotationOffset = Quaternion.Identity;
115 Vector3 offsetPosition = new Vector3(5, 10, 15);
116
117 SceneObjectPart part1
118 = new SceneObjectPart(
119 ownerId, shape, groupPosition, rotationOffset, offsetPosition);
120 part1.Scale = new Vector3(1, 1, 1);
121 part1.Name = partName;
122
123 object2 = new SceneObjectGroup(part1);
124 }
125 97
126 CoalescedSceneObjects coa = new CoalescedSceneObjects(m_userId, object1, object2); 98 CoalescedSceneObjects coa = new CoalescedSceneObjects(m_userId, object1, object2);
127 99
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
index ca7d9d9..9bb50db 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
@@ -296,11 +296,14 @@ namespace OpenSim.Region.Framework.Scenes
296 { 296 {
297 Vector3 val = value; 297 Vector3 val = value;
298 298
299 if ((m_scene.TestBorderCross(val - Vector3.UnitX, Cardinals.E) || m_scene.TestBorderCross(val + Vector3.UnitX, Cardinals.W) 299 if (Scene != null)
300 || m_scene.TestBorderCross(val - Vector3.UnitY, Cardinals.N) || m_scene.TestBorderCross(val + Vector3.UnitY, Cardinals.S))
301 && !IsAttachmentCheckFull() && (!m_scene.LoadingPrims))
302 { 300 {
303 m_scene.CrossPrimGroupIntoNewRegion(val, this, true); 301 if ((Scene.TestBorderCross(val - Vector3.UnitX, Cardinals.E) || Scene.TestBorderCross(val + Vector3.UnitX, Cardinals.W)
302 || Scene.TestBorderCross(val - Vector3.UnitY, Cardinals.N) || Scene.TestBorderCross(val + Vector3.UnitY, Cardinals.S))
303 && !IsAttachmentCheckFull() && (!Scene.LoadingPrims))
304 {
305 m_scene.CrossPrimGroupIntoNewRegion(val, this, true);
306 }
304 } 307 }
305 308
306 if (RootPart.GetStatusSandbox()) 309 if (RootPart.GetStatusSandbox())
@@ -308,8 +311,11 @@ namespace OpenSim.Region.Framework.Scenes
308 if (Util.GetDistanceTo(RootPart.StatusSandboxPos, value) > 10) 311 if (Util.GetDistanceTo(RootPart.StatusSandboxPos, value) > 10)
309 { 312 {
310 RootPart.ScriptSetPhysicsStatus(false); 313 RootPart.ScriptSetPhysicsStatus(false);
311 Scene.SimChat(Utils.StringToBytes("Hit Sandbox Limit"), 314
312 ChatTypeEnum.DebugChannel, 0x7FFFFFFF, RootPart.AbsolutePosition, Name, UUID, false); 315 if (Scene != null)
316 Scene.SimChat(Utils.StringToBytes("Hit Sandbox Limit"),
317 ChatTypeEnum.DebugChannel, 0x7FFFFFFF, RootPart.AbsolutePosition, Name, UUID, false);
318
313 return; 319 return;
314 } 320 }
315 } 321 }
@@ -326,7 +332,8 @@ namespace OpenSim.Region.Framework.Scenes
326 //m_scene.PhysicsScene.AddPhysicsActorTaint(m_rootPart.PhysActor); 332 //m_scene.PhysicsScene.AddPhysicsActorTaint(m_rootPart.PhysActor);
327 //} 333 //}
328 334
329 m_scene.EventManager.TriggerParcelPrimCountTainted(); 335 if (Scene != null)
336 Scene.EventManager.TriggerParcelPrimCountTainted();
330 } 337 }
331 } 338 }
332 339