diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index b474979..ed1bbd8 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; |
@@ -320,8 +320,18 @@ namespace OpenSim.Region.Framework.Scenes | |||
320 | protected SceneObjectPart m_rootPart; | 320 | protected SceneObjectPart m_rootPart; |
321 | // private Dictionary<UUID, scriptEvents> m_scriptEvents = new Dictionary<UUID, scriptEvents>(); | 321 | // private Dictionary<UUID, scriptEvents> m_scriptEvents = new Dictionary<UUID, scriptEvents>(); |
322 | 322 | ||
323 | private Dictionary<uint, scriptPosTarget> m_targets = new Dictionary<uint, scriptPosTarget>(); | 323 | private SortedDictionary<uint, scriptPosTarget> m_targets = new SortedDictionary<uint, scriptPosTarget>(); |
324 | private Dictionary<uint, scriptRotTarget> m_rotTargets = new Dictionary<uint, scriptRotTarget>(); | 324 | private SortedDictionary<uint, scriptRotTarget> m_rotTargets = new SortedDictionary<uint, scriptRotTarget>(); |
325 | |||
326 | public SortedDictionary<uint, scriptPosTarget> AtTargets | ||
327 | { | ||
328 | get { return m_targets; } | ||
329 | } | ||
330 | |||
331 | public SortedDictionary<uint, scriptRotTarget> RotTargets | ||
332 | { | ||
333 | get { return m_rotTargets; } | ||
334 | } | ||
325 | 335 | ||
326 | private bool m_scriptListens_atTarget; | 336 | private bool m_scriptListens_atTarget; |
327 | private bool m_scriptListens_notAtTarget; | 337 | private bool m_scriptListens_notAtTarget; |
@@ -4112,6 +4122,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
4112 | waypoint.handle = handle; | 4122 | waypoint.handle = handle; |
4113 | lock (m_rotTargets) | 4123 | lock (m_rotTargets) |
4114 | { | 4124 | { |
4125 | if (m_rotTargets.Count >= 8) | ||
4126 | m_rotTargets.Remove(m_rotTargets.ElementAt(0).Key); | ||
4115 | m_rotTargets.Add(handle, waypoint); | 4127 | m_rotTargets.Add(handle, waypoint); |
4116 | } | 4128 | } |
4117 | m_scene.AddGroupTarget(this); | 4129 | m_scene.AddGroupTarget(this); |
@@ -4137,6 +4149,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
4137 | waypoint.handle = handle; | 4149 | waypoint.handle = handle; |
4138 | lock (m_targets) | 4150 | lock (m_targets) |
4139 | { | 4151 | { |
4152 | if (m_targets.Count >= 8) | ||
4153 | m_targets.Remove(m_targets.ElementAt(0).Key); | ||
4140 | m_targets.Add(handle, waypoint); | 4154 | m_targets.Add(handle, waypoint); |
4141 | } | 4155 | } |
4142 | m_scene.AddGroupTarget(this); | 4156 | m_scene.AddGroupTarget(this); |