diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Scene.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.cs | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 6ca7ef2..f229e33 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -352,7 +352,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
352 | private readonly Timer m_restartTimer = new Timer(15000); // Wait before firing | 352 | private readonly Timer m_restartTimer = new Timer(15000); // Wait before firing |
353 | private volatile bool m_backingup; | 353 | private volatile bool m_backingup; |
354 | private Dictionary<UUID, ReturnInfo> m_returns = new Dictionary<UUID, ReturnInfo>(); | 354 | private Dictionary<UUID, ReturnInfo> m_returns = new Dictionary<UUID, ReturnInfo>(); |
355 | private Dictionary<UUID, SceneObjectGroup> m_groupsWithTargets = new Dictionary<UUID, SceneObjectGroup>(); | 355 | private Dictionary<UUID, int> m_groupsWithTargets = new Dictionary<UUID, int>(); |
356 | 356 | ||
357 | private string m_defaultScriptEngine; | 357 | private string m_defaultScriptEngine; |
358 | 358 | ||
@@ -1723,7 +1723,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1723 | public void AddGroupTarget(SceneObjectGroup grp) | 1723 | public void AddGroupTarget(SceneObjectGroup grp) |
1724 | { | 1724 | { |
1725 | lock (m_groupsWithTargets) | 1725 | lock (m_groupsWithTargets) |
1726 | m_groupsWithTargets[grp.UUID] = grp; | 1726 | m_groupsWithTargets[grp.UUID] = 0; |
1727 | } | 1727 | } |
1728 | 1728 | ||
1729 | public void RemoveGroupTarget(SceneObjectGroup grp) | 1729 | public void RemoveGroupTarget(SceneObjectGroup grp) |
@@ -1734,18 +1734,24 @@ namespace OpenSim.Region.Framework.Scenes | |||
1734 | 1734 | ||
1735 | private void CheckAtTargets() | 1735 | private void CheckAtTargets() |
1736 | { | 1736 | { |
1737 | List<SceneObjectGroup> objs = null; | 1737 | List<UUID> objs = null; |
1738 | 1738 | ||
1739 | lock (m_groupsWithTargets) | 1739 | lock (m_groupsWithTargets) |
1740 | { | 1740 | { |
1741 | if (m_groupsWithTargets.Count != 0) | 1741 | if (m_groupsWithTargets.Count != 0) |
1742 | objs = new List<SceneObjectGroup>(m_groupsWithTargets.Values); | 1742 | objs = new List<UUID>(m_groupsWithTargets.Keys); |
1743 | } | 1743 | } |
1744 | 1744 | ||
1745 | if (objs != null) | 1745 | if (objs != null) |
1746 | { | 1746 | { |
1747 | foreach (SceneObjectGroup entry in objs) | 1747 | foreach (UUID entry in objs) |
1748 | entry.checkAtTargets(); | 1748 | { |
1749 | SceneObjectGroup grp = GetSceneObjectGroup(entry); | ||
1750 | if (grp == null) | ||
1751 | m_groupsWithTargets.Remove(entry); | ||
1752 | else | ||
1753 | grp.checkAtTargets(); | ||
1754 | } | ||
1749 | } | 1755 | } |
1750 | } | 1756 | } |
1751 | 1757 | ||