aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes
diff options
context:
space:
mode:
authorMelanie2013-01-23 19:31:27 +0000
committerMelanie2013-01-23 19:31:27 +0000
commitfc1c77b42d6e35ecb6ad371484f355a3430018b1 (patch)
treee3c5fed0229a21902aa85a80b587e98fe397ac6c /OpenSim/Region/Framework/Scenes
parentMerge branch 'master' into careminster (diff)
parentRemove the return value from llGiveMoney (it was a LSL extension of OpenSim) and (diff)
downloadopensim-SC-fc1c77b42d6e35ecb6ad371484f355a3430018b1.zip
opensim-SC-fc1c77b42d6e35ecb6ad371484f355a3430018b1.tar.gz
opensim-SC-fc1c77b42d6e35ecb6ad371484f355a3430018b1.tar.bz2
opensim-SC-fc1c77b42d6e35ecb6ad371484f355a3430018b1.tar.xz
Merge branch 'avination' into careminster
Diffstat (limited to 'OpenSim/Region/Framework/Scenes')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs18
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs22
2 files changed, 30 insertions, 10 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
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
index 9c6a94b..0f5d116 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
@@ -79,14 +79,14 @@ namespace OpenSim.Region.Framework.Scenes
79 object_rez = 4194304 79 object_rez = 4194304
80 } 80 }
81 81
82 struct scriptPosTarget 82 public struct scriptPosTarget
83 { 83 {
84 public Vector3 targetPos; 84 public Vector3 targetPos;
85 public float tolerance; 85 public float tolerance;
86 public uint handle; 86 public uint handle;
87 } 87 }
88 88
89 struct scriptRotTarget 89 public struct scriptRotTarget
90 { 90 {
91 public Quaternion targetRot; 91 public Quaternion targetRot;
92 public float tolerance; 92 public float tolerance;
@@ -329,8 +329,18 @@ namespace OpenSim.Region.Framework.Scenes
329 protected SceneObjectPart m_rootPart; 329 protected SceneObjectPart m_rootPart;
330 // private Dictionary<UUID, scriptEvents> m_scriptEvents = new Dictionary<UUID, scriptEvents>(); 330 // private Dictionary<UUID, scriptEvents> m_scriptEvents = new Dictionary<UUID, scriptEvents>();
331 331
332 private Dictionary<uint, scriptPosTarget> m_targets = new Dictionary<uint, scriptPosTarget>(); 332 private SortedDictionary<uint, scriptPosTarget> m_targets = new SortedDictionary<uint, scriptPosTarget>();
333 private Dictionary<uint, scriptRotTarget> m_rotTargets = new Dictionary<uint, scriptRotTarget>(); 333 private SortedDictionary<uint, scriptRotTarget> m_rotTargets = new SortedDictionary<uint, scriptRotTarget>();
334
335 public SortedDictionary<uint, scriptPosTarget> AtTargets
336 {
337 get { return m_targets; }
338 }
339
340 public SortedDictionary<uint, scriptRotTarget> RotTargets
341 {
342 get { return m_rotTargets; }
343 }
334 344
335 private bool m_scriptListens_atTarget; 345 private bool m_scriptListens_atTarget;
336 private bool m_scriptListens_notAtTarget; 346 private bool m_scriptListens_notAtTarget;
@@ -4141,6 +4151,8 @@ namespace OpenSim.Region.Framework.Scenes
4141 waypoint.handle = handle; 4151 waypoint.handle = handle;
4142 lock (m_rotTargets) 4152 lock (m_rotTargets)
4143 { 4153 {
4154 if (m_rotTargets.Count >= 8)
4155 m_rotTargets.Remove(m_rotTargets.ElementAt(0).Key);
4144 m_rotTargets.Add(handle, waypoint); 4156 m_rotTargets.Add(handle, waypoint);
4145 } 4157 }
4146 m_scene.AddGroupTarget(this); 4158 m_scene.AddGroupTarget(this);
@@ -4166,6 +4178,8 @@ namespace OpenSim.Region.Framework.Scenes
4166 waypoint.handle = handle; 4178 waypoint.handle = handle;
4167 lock (m_targets) 4179 lock (m_targets)
4168 { 4180 {
4181 if (m_targets.Count >= 8)
4182 m_targets.Remove(m_targets.ElementAt(0).Key);
4169 m_targets.Add(handle, waypoint); 4183 m_targets.Add(handle, waypoint);
4170 } 4184 }
4171 m_scene.AddGroupTarget(this); 4185 m_scene.AddGroupTarget(this);