aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/ScenePresence.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/ScenePresence.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs22
1 files changed, 13 insertions, 9 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index f05c3d8..bdd80c6 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -1160,15 +1160,21 @@ namespace OpenSim.Region.Framework.Scenes
1160 /// </summary> 1160 /// </summary>
1161 public void HandleAgentUpdate(IClientAPI remoteClient, AgentUpdateArgs agentData) 1161 public void HandleAgentUpdate(IClientAPI remoteClient, AgentUpdateArgs agentData)
1162 { 1162 {
1163 lock (m_agentUpdates) 1163 const int AGENT_UPDATE_TIMEOUT_MS = 1000 * 3;
1164
1165 if (System.Threading.Monitor.TryEnter(m_agentUpdates, AGENT_UPDATE_TIMEOUT_MS))
1164 { 1166 {
1165 if (m_updatesAllowed) 1167 try
1166 { 1168 {
1167 RealHandleAgentUpdate(remoteClient, agentData); 1169 if (m_updatesAllowed)
1168 return; 1170 {
1171 RealHandleAgentUpdate(remoteClient, agentData);
1172 return;
1173 }
1174
1175 m_agentUpdates.Add(agentData);
1169 } 1176 }
1170 1177 finally { System.Threading.Monitor.Exit(m_agentUpdates); }
1171 m_agentUpdates.Add(agentData);
1172 } 1178 }
1173 } 1179 }
1174 1180
@@ -2471,7 +2477,7 @@ namespace OpenSim.Region.Framework.Scenes
2471 pos.Z -= m_appearance.HipOffset; 2477 pos.Z -= m_appearance.HipOffset;
2472 2478
2473 remoteClient.SendAvatarTerseUpdate(new SendAvatarTerseData(m_regionHandle, (ushort)(m_scene.TimeDilation * ushort.MaxValue), LocalId, 2479 remoteClient.SendAvatarTerseUpdate(new SendAvatarTerseData(m_regionHandle, (ushort)(m_scene.TimeDilation * ushort.MaxValue), LocalId,
2474 pos, m_velocity, m_rotation, m_uuid, GetUpdatePriority(remoteClient))); 2480 pos, m_velocity, Vector3.Zero, m_rotation, Vector4.Zero, m_uuid, null, GetUpdatePriority(remoteClient)));
2475 2481
2476 m_scene.StatsReporter.AddAgentTime(Environment.TickCount - m_perfMonMS); 2482 m_scene.StatsReporter.AddAgentTime(Environment.TickCount - m_perfMonMS);
2477 m_scene.StatsReporter.AddAgentUpdates(1); 2483 m_scene.StatsReporter.AddAgentUpdates(1);
@@ -3504,7 +3510,6 @@ namespace OpenSim.Region.Framework.Scenes
3504 3510
3505 public void Close() 3511 public void Close()
3506 { 3512 {
3507
3508 lock (m_attachments) 3513 lock (m_attachments)
3509 { 3514 {
3510 // Delete attachments from scene 3515 // Delete attachments from scene
@@ -3535,7 +3540,6 @@ namespace OpenSim.Region.Framework.Scenes
3535 m_sceneViewer.Close(); 3540 m_sceneViewer.Close();
3536 3541
3537 RemoveFromPhysicalScene(); 3542 RemoveFromPhysicalScene();
3538 GC.Collect();
3539 } 3543 }
3540 3544
3541 public ScenePresence() 3545 public ScenePresence()