From f8079bcd72a0b830bcd22788b4313880bbf81783 Mon Sep 17 00:00:00 2001 From: Dan Lake Date: Thu, 19 Jan 2012 02:52:05 -0800 Subject: [PATCH 1/9] Fixed bugs in earlier commit on custom user parameters in Regions.ini --- OpenSim/Framework/RegionInfo.cs | 45 ++++++++++++++++++--------------- 1 file changed, 25 insertions(+), 20 deletions(-) diff --git a/OpenSim/Framework/RegionInfo.cs b/OpenSim/Framework/RegionInfo.cs index 169b9513f0..0889d92645 100644 --- a/OpenSim/Framework/RegionInfo.cs +++ b/OpenSim/Framework/RegionInfo.cs @@ -447,14 +447,18 @@ namespace OpenSim.Framework public string GetOtherSetting(string key) { - string val; - m_otherSettings.TryGetValue(key, out val); - return val; + string val; + string keylower = key.ToLower(); + if (m_otherSettings.TryGetValue(keylower, out val)) + return val; + m_log.DebugFormat("[RegionInfo] Could not locate value for parameter {0}", key); + return null; } public void SetOtherSetting(string key, string value) - { - m_otherSettings[key] = value; + { + string keylower = key.ToLower(); + m_otherSettings[keylower] = value; } private void ReadNiniConfig(IConfigSource source, string name) @@ -496,12 +500,12 @@ namespace OpenSim.Framework HashSet allKeys = new HashSet(); foreach (string s in config.GetKeys()) { - allKeys.Add(s.ToLower()); + allKeys.Add(s); } // RegionUUID // - allKeys.Remove(("RegionUUID").ToLower()); + allKeys.Remove("RegionUUID"); string regionUUID = config.GetString("RegionUUID", string.Empty); if (regionUUID == String.Empty) { @@ -516,7 +520,7 @@ namespace OpenSim.Framework // Location // - allKeys.Remove(("Location").ToLower()); + allKeys.Remove("Location"); string location = config.GetString("Location", String.Empty); if (location == String.Empty) { @@ -532,7 +536,7 @@ namespace OpenSim.Framework // InternalAddress // IPAddress address; - allKeys.Remove(("InternalAddress").ToLower()); + allKeys.Remove("InternalAddress"); if (config.Contains("InternalAddress")) { address = IPAddress.Parse(config.GetString("InternalAddress", String.Empty)); @@ -546,7 +550,7 @@ namespace OpenSim.Framework // InternalPort // int port; - allKeys.Remove(("InternalPort").ToLower()); + allKeys.Remove("InternalPort"); if (config.Contains("InternalPort")) { port = config.GetInt("InternalPort", 9000); @@ -560,7 +564,7 @@ namespace OpenSim.Framework // AllowAlternatePorts // - allKeys.Remove(("AllowAlternatePorts").ToLower()); + allKeys.Remove("AllowAlternatePorts"); if (config.Contains("AllowAlternatePorts")) { m_allow_alternate_ports = config.GetBoolean("AllowAlternatePorts", true); @@ -574,7 +578,7 @@ namespace OpenSim.Framework // ExternalHostName // - allKeys.Remove(("ExternalHostName").ToLower()); + allKeys.Remove("ExternalHostName"); string externalName; if (config.Contains("ExternalHostName")) { @@ -599,29 +603,30 @@ namespace OpenSim.Framework // RegionType m_regionType = config.GetString("RegionType", String.Empty); - allKeys.Remove(("RegionType").ToLower()); + allKeys.Remove("RegionType"); // Prim stuff // m_nonphysPrimMax = config.GetInt("NonphysicalPrimMax", 256); - allKeys.Remove(("NonphysicalPrimMax").ToLower()); + allKeys.Remove("NonphysicalPrimMax"); m_physPrimMax = config.GetInt("PhysicalPrimMax", 10); - allKeys.Remove(("PhysicalPrimMax").ToLower()); + allKeys.Remove("PhysicalPrimMax"); m_clampPrimSize = config.GetBoolean("ClampPrimSize", false); - allKeys.Remove(("ClampPrimSize").ToLower()); + allKeys.Remove("ClampPrimSize"); m_objectCapacity = config.GetInt("MaxPrims", 15000); - allKeys.Remove(("MaxPrims").ToLower()); + allKeys.Remove("MaxPrims"); m_agentCapacity = config.GetInt("MaxAgents", 100); - allKeys.Remove(("MaxAgents").ToLower()); + allKeys.Remove("MaxAgents"); // Multi-tenancy // ScopeID = new UUID(config.GetString("ScopeID", UUID.Zero.ToString())); - allKeys.Remove(("ScopeID").ToLower()); + allKeys.Remove("ScopeID"); foreach (String s in allKeys) { - m_otherSettings.Add(s, config.GetString(s)); + string val = config.GetString(s); + SetOtherSetting(s, config.GetString(s)); } } From 2c6272d11a916953bee28ed4b36d839e8c8dd4a2 Mon Sep 17 00:00:00 2001 From: Dan Lake Date: Thu, 19 Jan 2012 02:53:21 -0800 Subject: [PATCH 2/9] Add a version of GetGroupByPrim to Scene which accepts UUID instead of localID --- OpenSim/Region/Framework/Scenes/Scene.cs | 10 ++++++++++ OpenSim/Region/Framework/Scenes/SceneGraph.cs | 3 ++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 027ec969ca..3d8c7144d8 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -4294,6 +4294,16 @@ namespace OpenSim.Region.Framework.Scenes public SceneObjectGroup GetGroupByPrim(uint localID) { return m_sceneGraph.GetGroupByPrim(localID); + } + + /// + /// Get a scene object group that contains the prim with the given uuid + /// + /// + /// null if no scene object group containing that prim is found + public SceneObjectGroup GetGroupByPrim(UUID fullID) + { + return m_sceneGraph.GetGroupByPrim(fullID); } public override bool TryGetScenePresence(UUID agentID, out ScenePresence sp) diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs index 1e2901b835..f481e72737 100644 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs @@ -311,6 +311,7 @@ namespace OpenSim.Region.Framework.Scenes /// /// /// This method does not send updates to the client - callers need to handle this themselves. + /// Caller should also trigger EventManager.TriggerObjectAddedToScene /// /// /// Position of the object. If null then the position stored in the object is used. @@ -925,7 +926,7 @@ namespace OpenSim.Region.Framework.Scenes /// /// /// null if no scene object group containing that prim is found - private SceneObjectGroup GetGroupByPrim(UUID fullID) + public SceneObjectGroup GetGroupByPrim(UUID fullID) { SceneObjectGroup sog; lock (SceneObjectGroupsByFullPartID) From 5ced49aaa8ca4362ef8b17cb4f892da8c11d0e3f Mon Sep 17 00:00:00 2001 From: Dan Lake Date: Thu, 19 Jan 2012 03:03:22 -0800 Subject: [PATCH 3/9] Cleaned up Color and Text parameters in SOP and made LocalFlags public for module access. --- .../Framework/Scenes/SceneObjectPart.cs | 26 +++++-------------- 1 file changed, 6 insertions(+), 20 deletions(-) diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index aea47e6407..a70c8fa371 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs @@ -236,7 +236,7 @@ namespace OpenSim.Region.Framework.Scenes public bool IgnoreUndoUpdate = false; - private PrimFlags LocalFlags; + public PrimFlags LocalFlags; private float m_damage = -1.0f; private byte[] m_TextureAnimation; @@ -904,32 +904,18 @@ namespace OpenSim.Region.Framework.Scenes public Color Color { get { return m_color; } - set - { - m_color = value; - - /* ScheduleFullUpdate() need not be called b/c after - * setting the color, the text will be set, so then - * ScheduleFullUpdate() will be called. */ - //ScheduleFullUpdate(); - } + set { m_color = value; } } public string Text { get { - string returnstr = m_text; - if (returnstr.Length > 255) - { - returnstr = returnstr.Substring(0, 254); - } - return returnstr; - } - set - { - m_text = value; + if (m_text.Length > 255) + return m_text.Substring(0, 254); + return m_text; } + set { m_text = value; } } From e41f23dead25356eb3e4bd37a5ef84c73e07336f Mon Sep 17 00:00:00 2001 From: Dan Lake Date: Thu, 19 Jan 2012 03:06:35 -0800 Subject: [PATCH 4/9] Trigger event when prims are scheduled for an update. This gives modules early access to changed parameters. --- .../Region/Framework/Scenes/EventManager.cs | 24 +++++++++++++++++++ .../Framework/Scenes/SceneObjectPart.cs | 4 ++++ 2 files changed, 28 insertions(+) diff --git a/OpenSim/Region/Framework/Scenes/EventManager.cs b/OpenSim/Region/Framework/Scenes/EventManager.cs index fd35c62cc2..3d96f40461 100644 --- a/OpenSim/Region/Framework/Scenes/EventManager.cs +++ b/OpenSim/Region/Framework/Scenes/EventManager.cs @@ -398,6 +398,9 @@ namespace OpenSim.Region.Framework.Scenes public event SceneObjectPartCopyDelegate OnSceneObjectPartCopy; public delegate void SceneObjectPartCopyDelegate(SceneObjectPart copy, SceneObjectPart original, bool userExposed); + public delegate void SceneObjectPartUpdated(SceneObjectPart sop); + public event SceneObjectPartUpdated OnSceneObjectPartUpdated; + public delegate void RegionUp(GridRegion region); public event RegionUp OnRegionUp; @@ -2203,6 +2206,27 @@ namespace OpenSim.Region.Framework.Scenes } } + public void TriggerSceneObjectPartUpdated(SceneObjectPart sop) + { + SceneObjectPartUpdated handler = OnSceneObjectPartUpdated; + if (handler != null) + { + foreach (SceneObjectPartUpdated d in handler.GetInvocationList()) + { + try + { + d(sop); + } + catch (Exception e) + { + m_log.ErrorFormat( + "[EVENT MANAGER]: Delegate for TriggerSceneObjectPartUpdated failed - continuing. {0} {1}", + e.Message, e.StackTrace); + } + } + } + } + public void TriggerOnParcelPropertiesUpdateRequest(LandUpdateArgs args, int local_id, IClientAPI remote_client) { diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index a70c8fa371..8e59abfe8b 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs @@ -2733,6 +2733,8 @@ namespace OpenSim.Region.Framework.Scenes if (ParentGroup == null) return; + ParentGroup.Scene.EventManager.TriggerSceneObjectPartUpdated(this); + ParentGroup.QueueForUpdateCheck(); int timeNow = Util.UnixTimeSinceEpoch(); @@ -2765,6 +2767,8 @@ namespace OpenSim.Region.Framework.Scenes if (ParentGroup == null) return; + ParentGroup.Scene.EventManager.TriggerSceneObjectPartUpdated(this); + // This was pulled from SceneViewer. Attachments always receive full updates. // I could not verify if this is a requirement but this maintains existing behavior if (ParentGroup.IsAttachment) From 0ce9ad4a56ecfcb021208acb4e9650612bc7e931 Mon Sep 17 00:00:00 2001 From: Dan Lake Date: Wed, 1 Feb 2012 16:27:20 -0800 Subject: [PATCH 5/9] Add event RegionHeartbeatEnd for modules interested in coordinating activity with region heartbeats --- .../Region/Framework/Scenes/EventManager.cs | 24 +++++++++++++++++++ OpenSim/Region/Framework/Scenes/Scene.cs | 22 +++++++++-------- 2 files changed, 36 insertions(+), 10 deletions(-) diff --git a/OpenSim/Region/Framework/Scenes/EventManager.cs b/OpenSim/Region/Framework/Scenes/EventManager.cs index 3d96f40461..d31d380145 100644 --- a/OpenSim/Region/Framework/Scenes/EventManager.cs +++ b/OpenSim/Region/Framework/Scenes/EventManager.cs @@ -407,6 +407,9 @@ namespace OpenSim.Region.Framework.Scenes public delegate void RegionStarted(Scene scene); public event RegionStarted OnRegionStarted; + public delegate void RegionHeartbeatEnd(Scene scene); + public event RegionHeartbeatEnd OnRegionHeartbeatEnd; + public delegate void LoginsEnabled(string regionName); public event LoginsEnabled OnLoginsEnabled; @@ -2291,6 +2294,27 @@ namespace OpenSim.Region.Framework.Scenes } } + public void TriggerRegionHeartbeatEnd(Scene scene) + { + RegionHeartbeatEnd handler = OnRegionHeartbeatEnd; + + if (handler != null) + { + foreach (RegionHeartbeatEnd d in handler.GetInvocationList()) + { + try + { + d(scene); + } + catch (Exception e) + { + m_log.ErrorFormat("[EVENT MANAGER]: Delegate for OnRegionHeartbeatEnd failed - continuing {0} - {1}", + e.Message, e.StackTrace); + } + } + } + } + public void TriggerLoginsEnabled (string regionName) { LoginsEnabled handler = OnLoginsEnabled; diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index bfe8d2c008..bbd216372c 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -1385,6 +1385,8 @@ namespace OpenSim.Region.Framework.Scenes RegionInfo.RegionName, e.Message, e.StackTrace); } + EventManager.TriggerRegionHeartbeatEnd(this); + maintc = Util.EnvironmentTickCountSubtract(maintc); maintc = (int)(MinFrameTime * 1000) - maintc; @@ -4290,16 +4292,16 @@ namespace OpenSim.Region.Framework.Scenes public SceneObjectGroup GetGroupByPrim(uint localID) { return m_sceneGraph.GetGroupByPrim(localID); - } - - /// - /// Get a scene object group that contains the prim with the given uuid - /// - /// - /// null if no scene object group containing that prim is found - public SceneObjectGroup GetGroupByPrim(UUID fullID) - { - return m_sceneGraph.GetGroupByPrim(fullID); + } + + /// + /// Get a scene object group that contains the prim with the given uuid + /// + /// + /// null if no scene object group containing that prim is found + public SceneObjectGroup GetGroupByPrim(UUID fullID) + { + return m_sceneGraph.GetGroupByPrim(fullID); } public override bool TryGetScenePresence(UUID agentID, out ScenePresence sp) From ee2b2aadc3daf4eb7ff51093aca5377b5adcfd1e Mon Sep 17 00:00:00 2001 From: Dan Lake Date: Thu, 2 Feb 2012 17:39:05 -0800 Subject: [PATCH 6/9] fix line endings --- OpenSim/Framework/RegionInfo.cs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/OpenSim/Framework/RegionInfo.cs b/OpenSim/Framework/RegionInfo.cs index 0889d92645..e2664dd322 100644 --- a/OpenSim/Framework/RegionInfo.cs +++ b/OpenSim/Framework/RegionInfo.cs @@ -447,16 +447,16 @@ namespace OpenSim.Framework public string GetOtherSetting(string key) { - string val; - string keylower = key.ToLower(); - if (m_otherSettings.TryGetValue(keylower, out val)) - return val; - m_log.DebugFormat("[RegionInfo] Could not locate value for parameter {0}", key); + string val; + string keylower = key.ToLower(); + if (m_otherSettings.TryGetValue(keylower, out val)) + return val; + m_log.DebugFormat("[RegionInfo] Could not locate value for parameter {0}", key); return null; } public void SetOtherSetting(string key, string value) - { + { string keylower = key.ToLower(); m_otherSettings[keylower] = value; } @@ -621,7 +621,7 @@ namespace OpenSim.Framework // Multi-tenancy // ScopeID = new UUID(config.GetString("ScopeID", UUID.Zero.ToString())); - allKeys.Remove("ScopeID"); + allKeys.Remove("ScopeID"); foreach (String s in allKeys) { From 146d78edfa2974038a7efe3f1c0f3d0e8d8520ae Mon Sep 17 00:00:00 2001 From: Dan Lake Date: Thu, 2 Feb 2012 17:41:05 -0800 Subject: [PATCH 7/9] ObjectAddedToScene event should be fired when duplicating objects --- OpenSim/Region/Framework/Scenes/Scene.cs | 26 ++++++++++++++++--- OpenSim/Region/Framework/Scenes/SceneGraph.cs | 16 ------------ 2 files changed, 22 insertions(+), 20 deletions(-) diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index bbd216372c..186e01c94f 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -2716,7 +2716,7 @@ namespace OpenSim.Region.Framework.Scenes client.OnObjectMaterial += m_sceneGraph.PrimMaterial; client.OnLinkObjects += LinkObjects; client.OnDelinkObjects += DelinkObjects; - client.OnObjectDuplicate += m_sceneGraph.DuplicateObject; + client.OnObjectDuplicate += DuplicateObject; client.OnObjectDuplicateOnRay += doObjectDuplicateOnRay; client.OnUpdatePrimFlags += m_sceneGraph.UpdatePrimFlags; client.OnRequestObjectPropertiesFamily += m_sceneGraph.RequestObjectPropertiesFamily; @@ -2843,7 +2843,7 @@ namespace OpenSim.Region.Framework.Scenes client.OnObjectMaterial -= m_sceneGraph.PrimMaterial; client.OnLinkObjects -= LinkObjects; client.OnDelinkObjects -= DelinkObjects; - client.OnObjectDuplicate -= m_sceneGraph.DuplicateObject; + client.OnObjectDuplicate -= DuplicateObject; client.OnObjectDuplicateOnRay -= doObjectDuplicateOnRay; client.OnUpdatePrimFlags -= m_sceneGraph.UpdatePrimFlags; client.OnRequestObjectPropertiesFamily -= m_sceneGraph.RequestObjectPropertiesFamily; @@ -2935,6 +2935,21 @@ namespace OpenSim.Region.Framework.Scenes } } + /// + /// Duplicates object specified by localID. This is the event handler for IClientAPI. + /// + /// ID of object to duplicate + /// + /// + /// Agent doing the duplication + /// Group of new object + public void DuplicateObject(uint originalPrim, Vector3 offset, uint flags, UUID AgentID, UUID GroupID) + { + SceneObjectGroup copy = SceneGraph.DuplicateObject(originalPrim, offset, flags, AgentID, GroupID, Quaternion.Identity); + if (copy != null) + EventManager.TriggerObjectAddedToScene(copy); + } + /// /// Duplicates object specified by localID at position raycasted against RayTargetObject using /// RayEnd and RayStart to determine what the angle of the ray is @@ -2997,19 +3012,22 @@ namespace OpenSim.Region.Framework.Scenes // stick in offset format from the original prim pos = pos - target.ParentGroup.AbsolutePosition; + SceneObjectGroup copy; if (CopyRotates) { Quaternion worldRot = target2.GetWorldRotation(); // SceneObjectGroup obj = m_sceneGraph.DuplicateObject(localID, pos, target.GetEffectiveObjectFlags(), AgentID, GroupID, worldRot); - m_sceneGraph.DuplicateObject(localID, pos, target.GetEffectiveObjectFlags(), AgentID, GroupID, worldRot); + copy = m_sceneGraph.DuplicateObject(localID, pos, target.GetEffectiveObjectFlags(), AgentID, GroupID, worldRot); //obj.Rotation = worldRot; //obj.UpdateGroupRotationR(worldRot); } else { - m_sceneGraph.DuplicateObject(localID, pos, target.GetEffectiveObjectFlags(), AgentID, GroupID); + copy = m_sceneGraph.DuplicateObject(localID, pos, target.GetEffectiveObjectFlags(), AgentID, GroupID, Quaternion.Identity); } + if (copy != null) + EventManager.TriggerObjectAddedToScene(copy); } } } diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs index 1487facf00..7d801b52c1 100644 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs @@ -1872,22 +1872,6 @@ namespace OpenSim.Region.Framework.Scenes #pragma warning restore 0612 } - /// - /// Duplicate the given object, Fire and Forget, No rotation, no return wrapper - /// - /// - /// - /// - /// - /// - protected internal void DuplicateObject(uint originalPrim, Vector3 offset, uint flags, UUID AgentID, UUID GroupID) - { - //m_log.DebugFormat("[SCENE]: Duplication of object {0} at offset {1} requested by agent {2}", originalPrim, offset, AgentID); - - // SceneObjectGroup dupe = DuplicateObject(originalPrim, offset, flags, AgentID, GroupID, Quaternion.Zero); - DuplicateObject(originalPrim, offset, flags, AgentID, GroupID, Quaternion.Identity); - } - /// /// Duplicate the given object. /// From ed846f11f17b7497c9a0bcf599fcb6431504c18e Mon Sep 17 00:00:00 2001 From: Dan Lake Date: Thu, 2 Feb 2012 18:06:34 -0800 Subject: [PATCH 8/9] OpenSim tests do not always create an EventManager so calls to trigger events during tests must check for null EventManager --- OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index 9b660b65d7..9fb11d3747 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs @@ -2729,7 +2729,9 @@ namespace OpenSim.Region.Framework.Scenes if (ParentGroup == null) return; - ParentGroup.Scene.EventManager.TriggerSceneObjectPartUpdated(this); + // When running OpenSim tests, EventManager can be null. Maybe tests should create an EventManager. + if(ParentGroup.Scene.EventManager != null) + ParentGroup.Scene.EventManager.TriggerSceneObjectPartUpdated(this); ParentGroup.QueueForUpdateCheck(); @@ -2763,7 +2765,9 @@ namespace OpenSim.Region.Framework.Scenes if (ParentGroup == null) return; - ParentGroup.Scene.EventManager.TriggerSceneObjectPartUpdated(this); + // When running OpenSim tests, EventManager can be null. Maybe tests should create an EventManager. + if (ParentGroup.Scene.EventManager != null) + ParentGroup.Scene.EventManager.TriggerSceneObjectPartUpdated(this); // This was pulled from SceneViewer. Attachments always receive full updates. // I could not verify if this is a requirement but this maintains existing behavior From 61adf36339f15fcbcc16d96ff7089f03edf72c10 Mon Sep 17 00:00:00 2001 From: Dan Lake Date: Thu, 2 Feb 2012 18:19:22 -0800 Subject: [PATCH 9/9] Commenting out new event until I can fix OpenSim tests. Currently, testing objects does not create a Scene or EventManager so triggering events crashes some tests --- OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index 9fb11d3747..27bcc09194 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs @@ -2729,9 +2729,9 @@ namespace OpenSim.Region.Framework.Scenes if (ParentGroup == null) return; - // When running OpenSim tests, EventManager can be null. Maybe tests should create an EventManager. - if(ParentGroup.Scene.EventManager != null) - ParentGroup.Scene.EventManager.TriggerSceneObjectPartUpdated(this); + // When running OpenSim tests, Scene (and EventManager can be null). + // Need to fix tests before we can trigger this here + // ParentGroup.Scene.EventManager.TriggerSceneObjectPartUpdated(this); ParentGroup.QueueForUpdateCheck(); @@ -2765,9 +2765,9 @@ namespace OpenSim.Region.Framework.Scenes if (ParentGroup == null) return; - // When running OpenSim tests, EventManager can be null. Maybe tests should create an EventManager. - if (ParentGroup.Scene.EventManager != null) - ParentGroup.Scene.EventManager.TriggerSceneObjectPartUpdated(this); + // When running OpenSim tests, Scene (and EventManager can be null). + // Need to fix tests before we can trigger this here + // ParentGroup.Scene.EventManager.TriggerSceneObjectPartUpdated(this); // This was pulled from SceneViewer. Attachments always receive full updates. // I could not verify if this is a requirement but this maintains existing behavior