aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes
diff options
context:
space:
mode:
authorMelanie2012-02-16 00:38:04 +0000
committerMelanie2012-02-16 00:38:04 +0000
commit0c1074537b8a83e68861a6f1a37db68214153165 (patch)
tree99212d4dbc1bab4ea6e620fab6853c576667232e /OpenSim/Region/Framework/Scenes
parentMerge branch 'master' of ssh://melanie@3dhosting.de/var/git/careminster into ... (diff)
parentFix some logic mistakes where firstly osNpcCreate() without options was creat... (diff)
downloadopensim-SC_OLD-0c1074537b8a83e68861a6f1a37db68214153165.zip
opensim-SC_OLD-0c1074537b8a83e68861a6f1a37db68214153165.tar.gz
opensim-SC_OLD-0c1074537b8a83e68861a6f1a37db68214153165.tar.bz2
opensim-SC_OLD-0c1074537b8a83e68861a6f1a37db68214153165.tar.xz
Merge branch 'master' into careminster
Conflicts: OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
Diffstat (limited to 'OpenSim/Region/Framework/Scenes')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneGraph.cs10
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPart.cs3
-rw-r--r--OpenSim/Region/Framework/Scenes/Tests/SceneObjectBasicTests.cs41
3 files changed, 47 insertions, 7 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
index 6dd42dd..5405358 100644
--- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
@@ -406,7 +406,7 @@ namespace OpenSim.Region.Framework.Scenes
406 m_log.ErrorFormat( 406 m_log.ErrorFormat(
407 "[SCENEGRAPH]: Tried to add scene object {0} to {1} with illegal UUID of {2}", 407 "[SCENEGRAPH]: Tried to add scene object {0} to {1} with illegal UUID of {2}",
408 sceneObject.Name, m_parentScene.RegionInfo.RegionName, UUID.Zero); 408 sceneObject.Name, m_parentScene.RegionInfo.RegionName, UUID.Zero);
409 409
410 return false; 410 return false;
411 } 411 }
412 412
@@ -415,12 +415,12 @@ namespace OpenSim.Region.Framework.Scenes
415// m_log.DebugFormat( 415// m_log.DebugFormat(
416// "[SCENEGRAPH]: Scene graph for {0} already contains object {1} in AddSceneObject()", 416// "[SCENEGRAPH]: Scene graph for {0} already contains object {1} in AddSceneObject()",
417// m_parentScene.RegionInfo.RegionName, sceneObject.UUID); 417// m_parentScene.RegionInfo.RegionName, sceneObject.UUID);
418 418
419 return false; 419 return false;
420 } 420 }
421 421
422// m_log.DebugFormat( 422// m_log.DebugFormat(
423// "[SCENEGRAPH]: Adding scene object {0} {1}, with {2} parts on {3}", 423// "[SCENEGRAPH]: Adding scene object {0} {1}, with {2} parts on {3}",
424// sceneObject.Name, sceneObject.UUID, sceneObject.Parts.Length, m_parentScene.RegionInfo.RegionName); 424// sceneObject.Name, sceneObject.UUID, sceneObject.Parts.Length, m_parentScene.RegionInfo.RegionName);
425 425
426 SceneObjectPart[] parts = sceneObject.Parts; 426 SceneObjectPart[] parts = sceneObject.Parts;
@@ -456,7 +456,7 @@ namespace OpenSim.Region.Framework.Scenes
456 456
457 lock (SceneObjectGroupsByFullID) 457 lock (SceneObjectGroupsByFullID)
458 SceneObjectGroupsByFullID[sceneObject.UUID] = sceneObject; 458 SceneObjectGroupsByFullID[sceneObject.UUID] = sceneObject;
459 459
460 lock (SceneObjectGroupsByFullPartID) 460 lock (SceneObjectGroupsByFullPartID)
461 { 461 {
462 foreach (SceneObjectPart part in parts) 462 foreach (SceneObjectPart part in parts)
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index ac39b6b..6cde89c 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -314,6 +314,9 @@ namespace OpenSim.Region.Framework.Scenes
314 314
315// ~SceneObjectPart() 315// ~SceneObjectPart()
316// { 316// {
317// Console.WriteLine(
318// "[SCENE OBJECT PART]: Destructor called for {0}, local id {1}, parent {2} {3}",
319// Name, LocalId, ParentGroup.Name, ParentGroup.LocalId);
317// m_log.DebugFormat( 320// m_log.DebugFormat(
318// "[SCENE OBJECT PART]: Destructor called for {0}, local id {1}, parent {2} {3}", 321// "[SCENE OBJECT PART]: Destructor called for {0}, local id {1}, parent {2} {3}",
319// Name, LocalId, ParentGroup.Name, ParentGroup.LocalId); 322// Name, LocalId, ParentGroup.Name, ParentGroup.LocalId);
diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectBasicTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectBasicTests.cs
index 80f198d..7737d8e 100644
--- a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectBasicTests.cs
+++ b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectBasicTests.cs
@@ -27,6 +27,7 @@
27 27
28using System; 28using System;
29using System.Reflection; 29using System.Reflection;
30using System.Threading;
30using NUnit.Framework; 31using NUnit.Framework;
31using OpenMetaverse; 32using OpenMetaverse;
32using OpenSim.Framework; 33using OpenSim.Framework;
@@ -43,6 +44,42 @@ namespace OpenSim.Region.Framework.Scenes.Tests
43 [TestFixture] 44 [TestFixture]
44 public class SceneObjectBasicTests 45 public class SceneObjectBasicTests
45 { 46 {
47// [TearDown]
48// public void TearDown()
49// {
50// Console.WriteLine("TearDown");
51// GC.Collect();
52// Thread.Sleep(3000);
53// }
54
55// public class GcNotify
56// {
57// public static AutoResetEvent gcEvent = new AutoResetEvent(false);
58// private static bool _initialized = false;
59//
60// public static void Initialize()
61// {
62// if (!_initialized)
63// {
64// _initialized = true;
65// new GcNotify();
66// }
67// }
68//
69// private GcNotify(){}
70//
71// ~GcNotify()
72// {
73// if (!Environment.HasShutdownStarted &&
74// !AppDomain.CurrentDomain.IsFinalizingForUnload())
75// {
76// Console.WriteLine("GcNotify called");
77// gcEvent.Set();
78// new GcNotify();
79// }
80// }
81// }
82
46 /// <summary> 83 /// <summary>
47 /// Test adding an object to a scene. 84 /// Test adding an object to a scene.
48 /// </summary> 85 /// </summary>
@@ -147,11 +184,11 @@ namespace OpenSim.Region.Framework.Scenes.Tests
147 public void TestDeleteSceneObject() 184 public void TestDeleteSceneObject()
148 { 185 {
149 TestHelpers.InMethod(); 186 TestHelpers.InMethod();
150 187
151 TestScene scene = SceneHelpers.SetupScene(); 188 TestScene scene = SceneHelpers.SetupScene();
152 SceneObjectPart part = SceneHelpers.AddSceneObject(scene); 189 SceneObjectPart part = SceneHelpers.AddSceneObject(scene);
153 scene.DeleteSceneObject(part.ParentGroup, false); 190 scene.DeleteSceneObject(part.ParentGroup, false);
154 191
155 SceneObjectPart retrievedPart = scene.GetSceneObjectPart(part.LocalId); 192 SceneObjectPart retrievedPart = scene.GetSceneObjectPart(part.LocalId);
156 Assert.That(retrievedPart, Is.Null); 193 Assert.That(retrievedPart, Is.Null);
157 } 194 }