aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes
diff options
context:
space:
mode:
authorMelanie2012-02-07 20:52:04 +0100
committerMelanie2012-02-07 20:52:04 +0100
commitde255321f1f1868e641f935ecaa25151867be1e3 (patch)
tree9baf834c0ad1eb40f5fd4dbae30efc7e992d54ee /OpenSim/Region/Framework/Scenes
parentExperimental. Expand Fire & Forget for NPC delete (diff)
parentMerge branch 'master' into careminster (diff)
downloadopensim-SC-de255321f1f1868e641f935ecaa25151867be1e3.zip
opensim-SC-de255321f1f1868e641f935ecaa25151867be1e3.tar.gz
opensim-SC-de255321f1f1868e641f935ecaa25151867be1e3.tar.bz2
opensim-SC-de255321f1f1868e641f935ecaa25151867be1e3.tar.xz
Merge branch 'master' of ssh://3dhosting.de/var/git/careminster
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPart.cs6
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs14
-rw-r--r--OpenSim/Region/Framework/Scenes/Tests/TaskInventoryTests.cs26
3 files changed, 32 insertions, 14 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index a6c234e..ac39b6b 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -1549,7 +1549,7 @@ namespace OpenSim.Region.Framework.Scenes
1549 PhysActor = null; 1549 PhysActor = null;
1550 } 1550 }
1551 1551
1552 // Basic Physics returns null.. joy joy joy. 1552 // Basic Physics can also return null as well as an exception catch.
1553 if (PhysActor != null) 1553 if (PhysActor != null)
1554 { 1554 {
1555 PhysActor.SOPName = this.Name; // save object into the PhysActor so ODE internals know the joint/body info 1555 PhysActor.SOPName = this.Name; // save object into the PhysActor so ODE internals know the joint/body info
@@ -1557,10 +1557,6 @@ namespace OpenSim.Region.Framework.Scenes
1557 DoPhysicsPropertyUpdate(RigidBody, true); 1557 DoPhysicsPropertyUpdate(RigidBody, true);
1558 PhysActor.SetVolumeDetect(VolumeDetectActive ? 1 : 0); 1558 PhysActor.SetVolumeDetect(VolumeDetectActive ? 1 : 0);
1559 } 1559 }
1560 else
1561 {
1562 m_log.DebugFormat("[SOP]: physics actor is null for {0} with parent {1}", UUID, this.ParentGroup.UUID);
1563 }
1564 } 1560 }
1565 } 1561 }
1566 } 1562 }
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
index dc64281..ca85d10 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
@@ -326,10 +326,8 @@ namespace OpenSim.Region.Framework.Scenes
326 /// <returns></returns> 326 /// <returns></returns>
327 public void CreateScriptInstance(TaskInventoryItem item, int startParam, bool postOnRez, string engine, int stateSource) 327 public void CreateScriptInstance(TaskInventoryItem item, int startParam, bool postOnRez, string engine, int stateSource)
328 { 328 {
329 // m_log.InfoFormat( 329// m_log.DebugFormat("[PRIM INVENTORY]: Starting script {0} {1} in prim {2} {3} in {4}",
330 // "[PRIM INVENTORY]: " + 330// item.Name, item.ItemID, m_part.Name, m_part.UUID, m_part.ParentGroup.Scene.RegionInfo.RegionName);
331 // "Starting script {0}, {1} in prim {2}, {3}",
332 // item.Name, item.ItemID, Name, UUID);
333 331
334 if (!m_part.ParentGroup.Scene.Permissions.CanRunScript(item.ItemID, m_part.UUID, item.OwnerID)) 332 if (!m_part.ParentGroup.Scene.Permissions.CanRunScript(item.ItemID, m_part.UUID, item.OwnerID))
335 { 333 {
@@ -362,8 +360,7 @@ namespace OpenSim.Region.Framework.Scenes
362 string msg = String.Format("asset ID {0} could not be found", item.AssetID); 360 string msg = String.Format("asset ID {0} could not be found", item.AssetID);
363 StoreScriptError(item.ItemID, msg); 361 StoreScriptError(item.ItemID, msg);
364 m_log.ErrorFormat( 362 m_log.ErrorFormat(
365 "[PRIM INVENTORY]: " + 363 "[PRIM INVENTORY]: Couldn't start script {0}, {1} at {2} in {3} since asset ID {4} could not be found",
366 "Couldn't start script {0}, {1} at {2} in {3} since asset ID {4} could not be found",
367 item.Name, item.ItemID, m_part.AbsolutePosition, 364 item.Name, item.ItemID, m_part.AbsolutePosition,
368 m_part.ParentGroup.Scene.RegionInfo.RegionName, item.AssetID); 365 m_part.ParentGroup.Scene.RegionInfo.RegionName, item.AssetID);
369 } 366 }
@@ -499,8 +496,9 @@ namespace OpenSim.Region.Framework.Scenes
499 string msg = String.Format("couldn't be found for prim {0}, {1}", m_part.Name, m_part.UUID); 496 string msg = String.Format("couldn't be found for prim {0}, {1}", m_part.Name, m_part.UUID);
500 StoreScriptError(itemId, msg); 497 StoreScriptError(itemId, msg);
501 m_log.ErrorFormat( 498 m_log.ErrorFormat(
502 "[PRIM INVENTORY]: " + 499 "[PRIM INVENTORY]: Couldn't start script with ID {0} since it couldn't be found for prim {1}, {2} at {3} in {4}",
503 "Couldn't start script with ID {0} since it {1}", itemId, msg); 500 itemId, m_part.Name, m_part.UUID,
501 m_part.AbsolutePosition, m_part.ParentGroup.Scene.RegionInfo.RegionName);
504 } 502 }
505 503
506 } 504 }
diff --git a/OpenSim/Region/Framework/Scenes/Tests/TaskInventoryTests.cs b/OpenSim/Region/Framework/Scenes/Tests/TaskInventoryTests.cs
index 1abef8d..e4b607d 100644
--- a/OpenSim/Region/Framework/Scenes/Tests/TaskInventoryTests.cs
+++ b/OpenSim/Region/Framework/Scenes/Tests/TaskInventoryTests.cs
@@ -53,6 +53,30 @@ namespace OpenSim.Region.Framework.Tests
53 public class TaskInventoryTests 53 public class TaskInventoryTests
54 { 54 {
55 [Test] 55 [Test]
56 public void TestAddTaskInventoryItem()
57 {
58 TestHelpers.InMethod();
59// log4net.Config.XmlConfigurator.Configure();
60
61 Scene scene = SceneHelpers.SetupScene();
62 UserAccount user1 = UserAccountHelpers.CreateUserWithInventory(scene);
63 SceneObjectGroup sog1 = SceneHelpers.CreateSceneObject(1, user1.PrincipalID);
64 SceneObjectPart sop1 = sog1.RootPart;
65
66 // Create an object embedded inside the first
67 UUID taskSceneObjectItemId = UUID.Parse("00000000-0000-0000-0000-100000000000");
68 TaskInventoryItem taskSceneObjectItem
69 = TaskInventoryHelpers.AddSceneObject(scene, sop1, "tso", taskSceneObjectItemId, user1.PrincipalID);
70
71 TaskInventoryItem addedItem = sop1.Inventory.GetInventoryItem(taskSceneObjectItemId);
72 Assert.That(addedItem.ItemID, Is.EqualTo(taskSceneObjectItemId));
73 Assert.That(addedItem.OwnerID, Is.EqualTo(user1.PrincipalID));
74 Assert.That(addedItem.ParentID, Is.EqualTo(sop1.UUID));
75 Assert.That(addedItem.InvType, Is.EqualTo((int)InventoryType.Object));
76 Assert.That(addedItem.Type, Is.EqualTo((int)AssetType.Object));
77 }
78
79 [Test]
56 public void TestRezObjectFromInventoryItem() 80 public void TestRezObjectFromInventoryItem()
57 { 81 {
58 TestHelpers.InMethod(); 82 TestHelpers.InMethod();
@@ -66,7 +90,7 @@ namespace OpenSim.Region.Framework.Tests
66 // Create an object embedded inside the first 90 // Create an object embedded inside the first
67 UUID taskSceneObjectItemId = UUID.Parse("00000000-0000-0000-0000-100000000000"); 91 UUID taskSceneObjectItemId = UUID.Parse("00000000-0000-0000-0000-100000000000");
68 TaskInventoryItem taskSceneObjectItem 92 TaskInventoryItem taskSceneObjectItem
69 = TaskInventoryHelpers.AddSceneObject(scene, sop1, "tso", taskSceneObjectItemId); 93 = TaskInventoryHelpers.AddSceneObject(scene, sop1, "tso", taskSceneObjectItemId, user1.PrincipalID);
70 94
71 scene.AddSceneObject(sog1); 95 scene.AddSceneObject(sog1);
72 96