aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/ScenePresence.cs
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2014-07-29 18:54:16 +0100
committerJustin Clark-Casey (justincc)2014-07-29 18:54:16 +0100
commitfcf5fb5dfdabf0c8318156522ca008ce50b19a94 (patch)
treed387b9d7b793962fce46b6f54ef0440001899773 /OpenSim/Region/Framework/Scenes/ScenePresence.cs
parentAdd debug mechanism for only sending 1 in N AgentUpdate packets to child agents. (diff)
downloadopensim-SC_OLD-fcf5fb5dfdabf0c8318156522ca008ce50b19a94.zip
opensim-SC_OLD-fcf5fb5dfdabf0c8318156522ca008ce50b19a94.tar.gz
opensim-SC_OLD-fcf5fb5dfdabf0c8318156522ca008ce50b19a94.tar.bz2
opensim-SC_OLD-fcf5fb5dfdabf0c8318156522ca008ce50b19a94.tar.xz
Implement "scene debug set root-upd-per" for dropping 1 in N root agent updates except to originator
For experimental purposes. Also corrects a previous bug where each terse update sent was counted rather than each set of terse updates to agents.
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/ScenePresence.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs21
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 }