diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 73a5c25..c7db306 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -3233,12 +3233,27 @@ namespace OpenSim.Region.Framework.Scenes | |||
3233 | /// <param name="remoteClient"></param> | 3233 | /// <param name="remoteClient"></param> |
3234 | public void SendTerseUpdateToClient(IClientAPI remoteClient) | 3234 | public void SendTerseUpdateToClient(IClientAPI remoteClient) |
3235 | { | 3235 | { |
3236 | m_terseUpdateCount++; | ||
3237 | |||
3238 | // If the client is inactive, it's getting its updates from another | 3236 | // If the client is inactive, it's getting its updates from another |
3239 | // server. | 3237 | // server. |
3240 | if (remoteClient.IsActive) | 3238 | if (remoteClient.IsActive) |
3241 | { | 3239 | { |
3240 | if (Scene.RootTerseUpdatePeriod > 1) | ||
3241 | { | ||
3242 | // Console.WriteLine( | ||
3243 | // "{0} {1} {2} {3} {4} {5} for {6} to {7}", | ||
3244 | // remoteClient.AgentId, UUID, remoteClient.SceneAgent.IsChildAgent, m_terseUpdateCount, Scene.RootTerseUpdatePeriod, Velocity.ApproxEquals(Vector3.Zero, 0.001f), Name, remoteClient.Name); | ||
3245 | if (remoteClient.AgentId != UUID | ||
3246 | && !remoteClient.SceneAgent.IsChildAgent | ||
3247 | && m_terseUpdateCount % Scene.RootTerseUpdatePeriod != 0 | ||
3248 | && !Velocity.ApproxEquals(Vector3.Zero, 0.001f)) | ||
3249 | { | ||
3250 | // m_log.DebugFormat("[SCENE PRESENCE]: Discarded update from {0} to {1}, args {2} {3} {4} {5} {6} {7}", | ||
3251 | // Name, remoteClient.Name, remoteClient.AgentId, UUID, remoteClient.SceneAgent.IsChildAgent, m_terseUpdateCount, Scene.RootTerseUpdatePeriod, Velocity.ApproxEquals(Vector3.Zero, 0.001f)); | ||
3252 | |||
3253 | return; | ||
3254 | } | ||
3255 | } | ||
3256 | |||
3242 | if (Scene.ChildTerseUpdatePeriod > 1 | 3257 | if (Scene.ChildTerseUpdatePeriod > 1 |
3243 | && remoteClient.SceneAgent.IsChildAgent | 3258 | && remoteClient.SceneAgent.IsChildAgent |
3244 | && m_terseUpdateCount % Scene.ChildTerseUpdatePeriod != 0 | 3259 | && m_terseUpdateCount % Scene.ChildTerseUpdatePeriod != 0 |
@@ -3304,6 +3319,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
3304 | lastTerseUpdateToAllClientsTick = currentTick; | 3319 | lastTerseUpdateToAllClientsTick = currentTick; |
3305 | lastPositionSentToAllClients = OffsetPosition; | 3320 | lastPositionSentToAllClients = OffsetPosition; |
3306 | 3321 | ||
3322 | m_terseUpdateCount++; | ||
3323 | |||
3307 | // Console.WriteLine("Scheduled update for {0} in {1}", Name, Scene.Name); | 3324 | // Console.WriteLine("Scheduled update for {0} in {1}", Name, Scene.Name); |
3308 | m_scene.ForEachClient(SendTerseUpdateToClient); | 3325 | m_scene.ForEachClient(SendTerseUpdateToClient); |
3309 | } | 3326 | } |