diff options
Merge branch 'master' into careminster
Conflicts:
OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
Diffstat (limited to '')
6 files changed, 66 insertions, 11 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 | ||
28 | using System; | 28 | using System; |
29 | using System.Reflection; | 29 | using System.Reflection; |
30 | using System.Threading; | ||
30 | using NUnit.Framework; | 31 | using NUnit.Framework; |
31 | using OpenMetaverse; | 32 | using OpenMetaverse; |
32 | using OpenSim.Framework; | 33 | using 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 | } |
diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs index d395206..ae46c97 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs | |||
@@ -121,8 +121,8 @@ namespace OpenSim.Region.OptionalModules.World.NPC | |||
121 | npcAvatar.CircuitCode = (uint)Util.RandomClass.Next(0, int.MaxValue); | 121 | npcAvatar.CircuitCode = (uint)Util.RandomClass.Next(0, int.MaxValue); |
122 | 122 | ||
123 | m_log.DebugFormat( | 123 | m_log.DebugFormat( |
124 | "[NPC MODULE]: Creating NPC {0} {1} {2} at {3} in {4}", | 124 | "[NPC MODULE]: Creating NPC {0} {1} {2}, owner={3}, senseAsAgent={4} at {5} in {6}", |
125 | firstname, lastname, npcAvatar.AgentId, position, scene.RegionInfo.RegionName); | 125 | firstname, lastname, npcAvatar.AgentId, owner, senseAsAgent, position, scene.RegionInfo.RegionName); |
126 | 126 | ||
127 | AgentCircuitData acd = new AgentCircuitData(); | 127 | AgentCircuitData acd = new AgentCircuitData(); |
128 | acd.AgentID = npcAvatar.AgentId; | 128 | acd.AgentID = npcAvatar.AgentId; |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index c83df4e..331cffd 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | |||
@@ -2254,7 +2254,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2254 | firstname, lastname, position, notecard, | 2254 | firstname, lastname, position, notecard, |
2255 | (options & ScriptBaseClass.OS_NPC_NOT_OWNED) == 0, | 2255 | (options & ScriptBaseClass.OS_NPC_NOT_OWNED) == 0, |
2256 | false); | 2256 | false); |
2257 | // (options & ScriptBaseClass.OS_NPC_SENSE_AS_AGENT) == 0); | 2257 | // (options & ScriptBaseClass.OS_NPC_SENSE_AS_AGENT) != 0); |
2258 | } | 2258 | } |
2259 | 2259 | ||
2260 | private LSL_Key NpcCreate( | 2260 | private LSL_Key NpcCreate( |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs index 5c200d6..83da204 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs | |||
@@ -31,7 +31,6 @@ using System.Collections.Generic; | |||
31 | using OpenMetaverse; | 31 | using OpenMetaverse; |
32 | using OpenSim.Framework; | 32 | using OpenSim.Framework; |
33 | using log4net; | 33 | using log4net; |
34 | |||
35 | using OpenSim.Region.Framework.Interfaces; | 34 | using OpenSim.Region.Framework.Interfaces; |
36 | using OpenSim.Region.Framework.Scenes; | 35 | using OpenSim.Region.Framework.Scenes; |
37 | using OpenSim.Region.ScriptEngine.Shared; | 36 | using OpenSim.Region.ScriptEngine.Shared; |
@@ -41,6 +40,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins | |||
41 | { | 40 | { |
42 | public class SensorRepeat | 41 | public class SensorRepeat |
43 | { | 42 | { |
43 | // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | ||
44 | |||
44 | public AsyncCommandManager m_CmdManager; | 45 | public AsyncCommandManager m_CmdManager; |
45 | 46 | ||
46 | public SensorRepeat(AsyncCommandManager CmdManager) | 47 | public SensorRepeat(AsyncCommandManager CmdManager) |
@@ -452,11 +453,20 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins | |||
452 | 453 | ||
453 | Action<ScenePresence> senseEntity = new Action<ScenePresence>(presence => | 454 | Action<ScenePresence> senseEntity = new Action<ScenePresence>(presence => |
454 | { | 455 | { |
456 | // m_log.DebugFormat( | ||
457 | // "[SENSOR REPEAT]: Inspecting scene presence {0}, type {1} on sensor sweep for {2}, type {3}", | ||
458 | // presence.Name, presence.PresenceType, ts.name, ts.type); | ||
459 | |||
455 | if ((ts.type & NPC) == 0 && presence.PresenceType == PresenceType.Npc) | 460 | if ((ts.type & NPC) == 0 && presence.PresenceType == PresenceType.Npc) |
456 | { | 461 | { |
457 | INPC npcData = npcModule.GetNPC(presence.UUID, presence.Scene); | 462 | INPC npcData = npcModule.GetNPC(presence.UUID, presence.Scene); |
458 | if (npcData == null || !npcData.SenseAsAgent) | 463 | if (npcData == null || !npcData.SenseAsAgent) |
464 | { | ||
465 | // m_log.DebugFormat( | ||
466 | // "[SENSOR REPEAT]: Discarding NPC {0} from agent sense sweep for script item id {1}", | ||
467 | // presence.Name, ts.itemID); | ||
459 | return; | 468 | return; |
469 | } | ||
460 | } | 470 | } |
461 | 471 | ||
462 | if ((ts.type & AGENT) == 0) | 472 | if ((ts.type & AGENT) == 0) |
@@ -469,7 +479,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins | |||
469 | { | 479 | { |
470 | INPC npcData = npcModule.GetNPC(presence.UUID, presence.Scene); | 480 | INPC npcData = npcModule.GetNPC(presence.UUID, presence.Scene); |
471 | if (npcData != null && npcData.SenseAsAgent) | 481 | if (npcData != null && npcData.SenseAsAgent) |
482 | { | ||
483 | // m_log.DebugFormat( | ||
484 | // "[SENSOR REPEAT]: Discarding NPC {0} from non-agent sense sweep for script item id {1}", | ||
485 | // presence.Name, ts.itemID); | ||
472 | return; | 486 | return; |
487 | } | ||
473 | } | 488 | } |
474 | } | 489 | } |
475 | 490 | ||