diff options
author | Justin Clark-Casey (justincc) | 2010-06-08 15:07:57 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2010-06-08 15:07:57 +0100 |
commit | b6076d7b337dc087807e56cdbe74ef47dc1b66b3 (patch) | |
tree | 7eb2f57ec5f4e62d36f69389c112402d76595ea1 /OpenSim/Region/Framework/Scenes/Scene.cs | |
parent | Add a call to SOG.ResumeScripts() after region crossing / teleport (diff) | |
download | opensim-SC-b6076d7b337dc087807e56cdbe74ef47dc1b66b3.zip opensim-SC-b6076d7b337dc087807e56cdbe74ef47dc1b66b3.tar.gz opensim-SC-b6076d7b337dc087807e56cdbe74ef47dc1b66b3.tar.bz2 opensim-SC-b6076d7b337dc087807e56cdbe74ef47dc1b66b3.tar.xz |
Reduce number of full updates sent on region crossing for attachments/huds to 1 from 3
This is one step towards reducing hud glitches on region crossing, since the viewer fails to display prims if it receives child full updates before the root prim full update
This commit also introduces a mechanism in LLClientView to stop child attachment updates ever going out before the root one
This is a very temporary mechanism and will be commented out when the next step of the fix (to give root prims higher udpate priority) is committed
This code is a foreport from the equivalent changes in 0.6.9-post-fixes
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Scene.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.cs | 42 |
1 files changed, 36 insertions, 6 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 2544359..4e90d09 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -2066,8 +2066,34 @@ namespace OpenSim.Region.Framework.Scenes | |||
2066 | sceneObject.ScheduleGroupForFullUpdate(); | 2066 | sceneObject.ScheduleGroupForFullUpdate(); |
2067 | 2067 | ||
2068 | return sceneObject; | 2068 | return sceneObject; |
2069 | } | ||
2070 | |||
2071 | /// <summary> | ||
2072 | /// Add an object into the scene that has come from storage | ||
2073 | /// </summary> | ||
2074 | /// | ||
2075 | /// <param name="sceneObject"></param> | ||
2076 | /// <param name="attachToBackup"> | ||
2077 | /// If true, changes to the object will be reflected in its persisted data | ||
2078 | /// If false, the persisted data will not be changed even if the object in the scene is changed | ||
2079 | /// </param> | ||
2080 | /// <param name="alreadyPersisted"> | ||
2081 | /// If true, we won't persist this object until it changes | ||
2082 | /// If false, we'll persist this object immediately | ||
2083 | /// </param> | ||
2084 | /// <param name="sendClientUpdates"> | ||
2085 | /// If true, we send updates to the client to tell it about this object | ||
2086 | /// If false, we leave it up to the caller to do this | ||
2087 | /// </param> | ||
2088 | /// <returns> | ||
2089 | /// true if the object was added, false if an object with the same uuid was already in the scene | ||
2090 | /// </returns> | ||
2091 | public bool AddRestoredSceneObject( | ||
2092 | SceneObjectGroup sceneObject, bool attachToBackup, bool alreadyPersisted, bool sendClientUpdates) | ||
2093 | { | ||
2094 | return m_sceneGraph.AddRestoredSceneObject(sceneObject, attachToBackup, alreadyPersisted, sendClientUpdates); | ||
2069 | } | 2095 | } |
2070 | 2096 | ||
2071 | /// <summary> | 2097 | /// <summary> |
2072 | /// Add an object into the scene that has come from storage | 2098 | /// Add an object into the scene that has come from storage |
2073 | /// </summary> | 2099 | /// </summary> |
@@ -2087,7 +2113,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2087 | public bool AddRestoredSceneObject( | 2113 | public bool AddRestoredSceneObject( |
2088 | SceneObjectGroup sceneObject, bool attachToBackup, bool alreadyPersisted) | 2114 | SceneObjectGroup sceneObject, bool attachToBackup, bool alreadyPersisted) |
2089 | { | 2115 | { |
2090 | return m_sceneGraph.AddRestoredSceneObject(sceneObject, attachToBackup, alreadyPersisted); | 2116 | return AddRestoredSceneObject(sceneObject, attachToBackup, alreadyPersisted, true); |
2091 | } | 2117 | } |
2092 | 2118 | ||
2093 | /// <summary> | 2119 | /// <summary> |
@@ -2527,7 +2553,10 @@ namespace OpenSim.Region.Framework.Scenes | |||
2527 | sceneObject.RootPart.AddFlag(PrimFlags.TemporaryOnRez); | 2553 | sceneObject.RootPart.AddFlag(PrimFlags.TemporaryOnRez); |
2528 | sceneObject.RootPart.AddFlag(PrimFlags.Phantom); | 2554 | sceneObject.RootPart.AddFlag(PrimFlags.Phantom); |
2529 | 2555 | ||
2530 | AddRestoredSceneObject(sceneObject, false, false); | 2556 | |
2557 | // Don't sent a full update here because this will cause full updates to be sent twice for | ||
2558 | // attachments on region crossings, resulting in viewer glitches. | ||
2559 | AddRestoredSceneObject(sceneObject, false, false, false); | ||
2531 | 2560 | ||
2532 | // Handle attachment special case | 2561 | // Handle attachment special case |
2533 | SceneObjectPart RootPrim = sceneObject.RootPart; | 2562 | SceneObjectPart RootPrim = sceneObject.RootPart; |
@@ -2554,12 +2583,13 @@ namespace OpenSim.Region.Framework.Scenes | |||
2554 | m_log.DebugFormat( | 2583 | m_log.DebugFormat( |
2555 | "[ATTACHMENT]: Attach to avatar {0} at position {1}", sp.UUID, grp.AbsolutePosition); | 2584 | "[ATTACHMENT]: Attach to avatar {0} at position {1}", sp.UUID, grp.AbsolutePosition); |
2556 | 2585 | ||
2586 | RootPrim.RemFlag(PrimFlags.TemporaryOnRez); | ||
2587 | |||
2557 | if (AttachmentsModule != null) | 2588 | if (AttachmentsModule != null) |
2558 | AttachmentsModule.AttachObject( | 2589 | AttachmentsModule.AttachObject( |
2559 | sp.ControllingClient, grp.LocalId, (uint)0, grp.GroupRotation, grp.AbsolutePosition, false); | 2590 | sp.ControllingClient, grp.LocalId, (uint)0, grp.GroupRotation, grp.AbsolutePosition, false); |
2560 | 2591 | ||
2561 | RootPrim.RemFlag(PrimFlags.TemporaryOnRez); | 2592 | //grp.SendGroupFullUpdate(); |
2562 | grp.SendGroupFullUpdate(); | ||
2563 | } | 2593 | } |
2564 | else | 2594 | else |
2565 | { | 2595 | { |