diff options
Diffstat (limited to 'OpenSim/Region')
-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 23006f2..9d07537 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -282,7 +282,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
282 | private readonly Timer m_restartTimer = new Timer(15000); // Wait before firing | 282 | private readonly Timer m_restartTimer = new Timer(15000); // Wait before firing |
283 | private volatile bool m_backingup; | 283 | private volatile bool m_backingup; |
284 | private Dictionary<UUID, ReturnInfo> m_returns = new Dictionary<UUID, ReturnInfo>(); | 284 | private Dictionary<UUID, ReturnInfo> m_returns = new Dictionary<UUID, ReturnInfo>(); |
285 | private Dictionary<UUID, SceneObjectGroup> m_groupsWithTargets = new Dictionary<UUID, SceneObjectGroup>(); | 285 | private Dictionary<UUID, int> m_groupsWithTargets = new Dictionary<UUID, int>(); |
286 | 286 | ||
287 | private bool m_physics_enabled = true; | 287 | private bool m_physics_enabled = true; |
288 | private bool m_scripts_enabled = true; | 288 | private bool m_scripts_enabled = true; |
@@ -1736,7 +1736,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1736 | public void AddGroupTarget(SceneObjectGroup grp) | 1736 | public void AddGroupTarget(SceneObjectGroup grp) |
1737 | { | 1737 | { |
1738 | lock (m_groupsWithTargets) | 1738 | lock (m_groupsWithTargets) |
1739 | m_groupsWithTargets[grp.UUID] = grp; | 1739 | m_groupsWithTargets[grp.UUID] = 0; |
1740 | } | 1740 | } |
1741 | 1741 | ||
1742 | public void RemoveGroupTarget(SceneObjectGroup grp) | 1742 | public void RemoveGroupTarget(SceneObjectGroup grp) |
@@ -1747,18 +1747,24 @@ namespace OpenSim.Region.Framework.Scenes | |||
1747 | 1747 | ||
1748 | private void CheckAtTargets() | 1748 | private void CheckAtTargets() |
1749 | { | 1749 | { |
1750 | List<SceneObjectGroup> objs = null; | 1750 | List<UUID> objs = null; |
1751 | 1751 | ||
1752 | lock (m_groupsWithTargets) | 1752 | lock (m_groupsWithTargets) |
1753 | { | 1753 | { |
1754 | if (m_groupsWithTargets.Count != 0) | 1754 | if (m_groupsWithTargets.Count != 0) |
1755 | objs = new List<SceneObjectGroup>(m_groupsWithTargets.Values); | 1755 | objs = new List<UUID>(m_groupsWithTargets.Keys); |
1756 | } | 1756 | } |
1757 | 1757 | ||
1758 | if (objs != null) | 1758 | if (objs != null) |
1759 | { | 1759 | { |
1760 | foreach (SceneObjectGroup entry in objs) | 1760 | foreach (UUID entry in objs) |
1761 | entry.checkAtTargets(); | 1761 | { |
1762 | SceneObjectGroup grp = GetSceneObjectGroup(entry); | ||
1763 | if (grp == null) | ||
1764 | m_groupsWithTargets.Remove(entry); | ||
1765 | else | ||
1766 | grp.checkAtTargets(); | ||
1767 | } | ||
1762 | } | 1768 | } |
1763 | } | 1769 | } |
1764 | 1770 | ||