Only create a new list to check if objects have reached targets if there actually are any targets.
parent
5498a64a9f
commit
fe503de17a
|
@ -1648,15 +1648,19 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
private void CheckAtTargets()
|
private void CheckAtTargets()
|
||||||
{
|
{
|
||||||
List<SceneObjectGroup> objs = new List<SceneObjectGroup>();
|
List<SceneObjectGroup> objs = null;
|
||||||
|
|
||||||
lock (m_groupsWithTargets)
|
lock (m_groupsWithTargets)
|
||||||
{
|
{
|
||||||
foreach (SceneObjectGroup grp in m_groupsWithTargets.Values)
|
if (m_groupsWithTargets.Count != 0)
|
||||||
objs.Add(grp);
|
objs = new List<SceneObjectGroup>(m_groupsWithTargets.Values);
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (SceneObjectGroup entry in objs)
|
if (objs != null)
|
||||||
entry.checkAtTargets();
|
{
|
||||||
|
foreach (SceneObjectGroup entry in objs)
|
||||||
|
entry.checkAtTargets();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
Loading…
Reference in New Issue