diff options
author | John Hurliman | 2009-10-18 20:24:20 -0700 |
---|---|---|
committer | John Hurliman | 2009-10-18 20:24:20 -0700 |
commit | 233e16b99cc80190d41143ecdfe01308eb39932a (patch) | |
tree | 340a75427ec8fc9082a0f543021dbfebacdb3033 /OpenSim/Region/Framework/Scenes/Scene.cs | |
parent | * Process the avatar terse update priority queue as soon as an update for our... (diff) | |
download | opensim-SC_OLD-233e16b99cc80190d41143ecdfe01308eb39932a.zip opensim-SC_OLD-233e16b99cc80190d41143ecdfe01308eb39932a.tar.gz opensim-SC_OLD-233e16b99cc80190d41143ecdfe01308eb39932a.tar.bz2 opensim-SC_OLD-233e16b99cc80190d41143ecdfe01308eb39932a.tar.xz |
* Rewrote the methods that build ObjectUpdate and ImprovedTerseObjectUpdate packets to fill in the data more accurately and avoid allocating memory that is immediately thrown away
* Changed the Send*Data structs in IClientAPI to use public readonly members instead of private members and getters
* Made Parallel.ProcessorCount public
* Started switching over packet building methods in LLClientView to use Util.StringToBytes[256/1024]() instead of Utils.StringToBytes()
* More cleanup of the ScenePresences vs. ClientManager nightmare
* ScenePresence.HandleAgentUpdate() will now time out and drop incoming AgentUpdate packets after three seconds. This fixes a deadlock on m_AgentUpdates that was blocking up the LLUDP server
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.cs | 35 |
1 files changed, 11 insertions, 24 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 30fe976..70b11c3 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -357,13 +357,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
357 | get { return m_defaultScriptEngine; } | 357 | get { return m_defaultScriptEngine; } |
358 | } | 358 | } |
359 | 359 | ||
360 | // Reference to all of the agents in the scene (root and child) | ||
361 | protected Dictionary<UUID, ScenePresence> m_scenePresences | ||
362 | { | ||
363 | get { return m_sceneGraph.ScenePresences; } | ||
364 | set { m_sceneGraph.ScenePresences = value; } | ||
365 | } | ||
366 | |||
367 | public EntityManager Entities | 360 | public EntityManager Entities |
368 | { | 361 | { |
369 | get { return m_sceneGraph.Entities; } | 362 | get { return m_sceneGraph.Entities; } |
@@ -1183,14 +1176,13 @@ namespace OpenSim.Region.Framework.Scenes | |||
1183 | /// <param name="stats">Stats on the Simulator's performance</param> | 1176 | /// <param name="stats">Stats on the Simulator's performance</param> |
1184 | private void SendSimStatsPackets(SimStats stats) | 1177 | private void SendSimStatsPackets(SimStats stats) |
1185 | { | 1178 | { |
1186 | List<ScenePresence> StatSendAgents = GetScenePresences(); | 1179 | ForEachScenePresence( |
1187 | foreach (ScenePresence agent in StatSendAgents) | 1180 | delegate(ScenePresence agent) |
1188 | { | ||
1189 | if (!agent.IsChildAgent) | ||
1190 | { | 1181 | { |
1191 | agent.ControllingClient.SendSimStats(stats); | 1182 | if (!agent.IsChildAgent) |
1183 | agent.ControllingClient.SendSimStats(stats); | ||
1192 | } | 1184 | } |
1193 | } | 1185 | ); |
1194 | } | 1186 | } |
1195 | 1187 | ||
1196 | /// <summary> | 1188 | /// <summary> |
@@ -3501,10 +3493,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
3501 | { | 3493 | { |
3502 | ScenePresence presence; | 3494 | ScenePresence presence; |
3503 | 3495 | ||
3504 | lock (m_scenePresences) | 3496 | lock (m_sceneGraph.ScenePresences) |
3505 | { | 3497 | m_sceneGraph.ScenePresences.TryGetValue(agentID, out presence); |
3506 | m_scenePresences.TryGetValue(agentID, out presence); | ||
3507 | } | ||
3508 | 3498 | ||
3509 | if (presence != null) | 3499 | if (presence != null) |
3510 | { | 3500 | { |
@@ -3714,12 +3704,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
3714 | public void RequestTeleportLocation(IClientAPI remoteClient, ulong regionHandle, Vector3 position, | 3704 | public void RequestTeleportLocation(IClientAPI remoteClient, ulong regionHandle, Vector3 position, |
3715 | Vector3 lookAt, uint teleportFlags) | 3705 | Vector3 lookAt, uint teleportFlags) |
3716 | { | 3706 | { |
3717 | ScenePresence sp = null; | 3707 | ScenePresence sp; |
3718 | lock (m_scenePresences) | 3708 | lock (m_sceneGraph.ScenePresences) |
3719 | { | 3709 | m_sceneGraph.ScenePresences.TryGetValue(remoteClient.AgentId, out sp); |
3720 | if (m_scenePresences.ContainsKey(remoteClient.AgentId)) | ||
3721 | sp = m_scenePresences[remoteClient.AgentId]; | ||
3722 | } | ||
3723 | 3710 | ||
3724 | if (sp != null) | 3711 | if (sp != null) |
3725 | { | 3712 | { |
@@ -4168,7 +4155,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
4168 | public void ForEachScenePresence(Action<ScenePresence> action) | 4155 | public void ForEachScenePresence(Action<ScenePresence> action) |
4169 | { | 4156 | { |
4170 | // We don't want to try to send messages if there are no avatars. | 4157 | // We don't want to try to send messages if there are no avatars. |
4171 | if (m_scenePresences != null) | 4158 | if (m_sceneGraph != null && m_sceneGraph.ScenePresences != null) |
4172 | { | 4159 | { |
4173 | try | 4160 | try |
4174 | { | 4161 | { |