diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index 81d458a577..ea3283da62 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs @@ -249,6 +249,7 @@ namespace OpenSim.Region.Environment.Scenes protected virtual void RegisterDefaultSceneEvents() { m_eventManager.OnParcelPrimCountAdd += m_LandManager.addPrimToLandPrimCounts; + m_eventManager.OnParcelPrimCountUpdate += this.addPrimsToParcelCounts; m_eventManager.OnPermissionError += SendPermissionAlert; } @@ -1137,6 +1138,18 @@ namespace OpenSim.Region.Environment.Scenes m_LandManager.landPrimCountTainted = false; } + + public void addPrimsToParcelCounts() + { + foreach (EntityBase obj in Entities.Values) + { + if (obj is SceneObjectGroup) + { + m_eventManager.TriggerParcelPrimCountAdd((SceneObjectGroup)obj); + } + } + } + #endregion #region Console Commands