diff options
Merge branch '0.6.9-post-fixes' into careminster
Diffstat (limited to 'OpenSim/Region/Framework')
8 files changed, 22 insertions, 122 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index 4019c12..cedf405 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | |||
@@ -2458,8 +2458,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
2458 | return; | 2458 | return; |
2459 | } | 2459 | } |
2460 | 2460 | ||
2461 | m_log.DebugFormat("[SCENE INVENTORY]: {0} {1} IsAttachment={2}", att.Name, att.LocalId, att.IsAttachment); | ||
2462 | Console.WriteLine("HERE X"); | ||
2463 | ScenePresence presence; | 2461 | ScenePresence presence; |
2464 | if (TryGetAvatar(remoteClient.AgentId, out presence)) | 2462 | if (TryGetAvatar(remoteClient.AgentId, out presence)) |
2465 | { | 2463 | { |
@@ -2467,12 +2465,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
2467 | InventoryItemBase item = new InventoryItemBase(itemID, remoteClient.AgentId); | 2465 | InventoryItemBase item = new InventoryItemBase(itemID, remoteClient.AgentId); |
2468 | item = InventoryService.GetItem(item); | 2466 | item = InventoryService.GetItem(item); |
2469 | presence.Appearance.SetAttachment((int)AttachmentPt, itemID, item.AssetID /*att.UUID*/); | 2467 | presence.Appearance.SetAttachment((int)AttachmentPt, itemID, item.AssetID /*att.UUID*/); |
2470 | Console.WriteLine("HERE Y"); | ||
2471 | 2468 | ||
2472 | if (m_AvatarFactory != null) | 2469 | if (m_AvatarFactory != null) |
2473 | m_AvatarFactory.UpdateDatabase(remoteClient.AgentId, presence.Appearance); | 2470 | m_AvatarFactory.UpdateDatabase(remoteClient.AgentId, presence.Appearance); |
2474 | |||
2475 | Console.WriteLine("HERE Z"); | ||
2476 | } | 2471 | } |
2477 | } | 2472 | } |
2478 | 2473 | ||
@@ -2655,4 +2650,4 @@ namespace OpenSim.Region.Framework.Scenes | |||
2655 | m_sceneGraph.LinkObjects(root, children); | 2650 | m_sceneGraph.LinkObjects(root, children); |
2656 | } | 2651 | } |
2657 | } | 2652 | } |
2658 | } | 2653 | } \ No newline at end of file |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs index d8e604f..ac04dc7 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs | |||
@@ -124,7 +124,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
124 | { | 124 | { |
125 | if (((SceneObjectGroup)ent).LocalId == primLocalID) | 125 | if (((SceneObjectGroup)ent).LocalId == primLocalID) |
126 | { | 126 | { |
127 | m_log.DebugFormat("[SCENE]: Received full update request for {0} from {1}", primLocalID, remoteClient.Name); | ||
128 | ((SceneObjectGroup)ent).SendFullUpdateToClient(remoteClient); | 127 | ((SceneObjectGroup)ent).SendFullUpdateToClient(remoteClient); |
129 | return; | 128 | return; |
130 | } | 129 | } |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index a3c5a03..4bd3222 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -1891,31 +1891,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
1891 | /// true if the object was added, false if an object with the same uuid was already in the scene | 1891 | /// true if the object was added, false if an object with the same uuid was already in the scene |
1892 | /// </returns> | 1892 | /// </returns> |
1893 | public bool AddRestoredSceneObject( | 1893 | public bool AddRestoredSceneObject( |
1894 | SceneObjectGroup sceneObject, bool attachToBackup, bool alreadyPersisted, bool sendClientUpdates) | ||
1895 | { | ||
1896 | return m_sceneGraph.AddRestoredSceneObject(sceneObject, attachToBackup, alreadyPersisted, sendClientUpdates); | ||
1897 | } | ||
1898 | |||
1899 | /// <summary> | ||
1900 | /// Add an object into the scene that has come from storage | ||
1901 | /// </summary> | ||
1902 | /// | ||
1903 | /// <param name="sceneObject"></param> | ||
1904 | /// <param name="attachToBackup"> | ||
1905 | /// If true, changes to the object will be reflected in its persisted data | ||
1906 | /// If false, the persisted data will not be changed even if the object in the scene is changed | ||
1907 | /// </param> | ||
1908 | /// <param name="alreadyPersisted"> | ||
1909 | /// If true, we won't persist this object until it changes | ||
1910 | /// If false, we'll persist this object immediately | ||
1911 | /// </param> | ||
1912 | /// <returns> | ||
1913 | /// true if the object was added, false if an object with the same uuid was already in the scene | ||
1914 | /// </returns> | ||
1915 | public bool AddRestoredSceneObject( | ||
1916 | SceneObjectGroup sceneObject, bool attachToBackup, bool alreadyPersisted) | 1894 | SceneObjectGroup sceneObject, bool attachToBackup, bool alreadyPersisted) |
1917 | { | 1895 | { |
1918 | return AddRestoredSceneObject(sceneObject, attachToBackup, alreadyPersisted, true); | 1896 | return m_sceneGraph.AddRestoredSceneObject(sceneObject, attachToBackup, alreadyPersisted); |
1919 | } | 1897 | } |
1920 | 1898 | ||
1921 | /// <summary> | 1899 | /// <summary> |
@@ -2528,7 +2506,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2528 | /// <returns></returns> | 2506 | /// <returns></returns> |
2529 | public bool IncomingCreateObject(ISceneObject sog) | 2507 | public bool IncomingCreateObject(ISceneObject sog) |
2530 | { | 2508 | { |
2531 | m_log.Debug(" >>> IncomingCreateObject(sog) <<< " + ((SceneObjectGroup)sog).AbsolutePosition + " deleted? " + ((SceneObjectGroup)sog).IsDeleted); | 2509 | //m_log.Debug(" >>> IncomingCreateObject(sog) <<< " + ((SceneObjectGroup)sog).AbsolutePosition + " deleted? " + ((SceneObjectGroup)sog).IsDeleted); |
2532 | SceneObjectGroup newObject; | 2510 | SceneObjectGroup newObject; |
2533 | try | 2511 | try |
2534 | { | 2512 | { |
@@ -2600,12 +2578,10 @@ namespace OpenSim.Region.Framework.Scenes | |||
2600 | 2578 | ||
2601 | if (sceneObject.IsAttachmentCheckFull()) // Attachment | 2579 | if (sceneObject.IsAttachmentCheckFull()) // Attachment |
2602 | { | 2580 | { |
2603 | m_log.DebugFormat("[SCENE]: Adding attachment {0} {1}", sceneObject.Name, sceneObject.LocalId); | ||
2604 | |||
2605 | sceneObject.RootPart.AddFlag(PrimFlags.TemporaryOnRez); | 2581 | sceneObject.RootPart.AddFlag(PrimFlags.TemporaryOnRez); |
2606 | sceneObject.RootPart.AddFlag(PrimFlags.Phantom); | 2582 | sceneObject.RootPart.AddFlag(PrimFlags.Phantom); |
2607 | 2583 | ||
2608 | AddRestoredSceneObject(sceneObject, false, false, false); | 2584 | AddRestoredSceneObject(sceneObject, false, false); |
2609 | 2585 | ||
2610 | // Handle attachment special case | 2586 | // Handle attachment special case |
2611 | SceneObjectPart RootPrim = sceneObject.RootPart; | 2587 | SceneObjectPart RootPrim = sceneObject.RootPart; |
@@ -2613,8 +2589,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
2613 | // Fix up attachment Parent Local ID | 2589 | // Fix up attachment Parent Local ID |
2614 | ScenePresence sp = GetScenePresence(sceneObject.OwnerID); | 2590 | ScenePresence sp = GetScenePresence(sceneObject.OwnerID); |
2615 | 2591 | ||
2616 | Console.WriteLine("AAAA"); | ||
2617 | |||
2618 | //uint parentLocalID = 0; | 2592 | //uint parentLocalID = 0; |
2619 | if (sp != null) | 2593 | if (sp != null) |
2620 | { | 2594 | { |
@@ -2633,25 +2607,20 @@ namespace OpenSim.Region.Framework.Scenes | |||
2633 | //grp.SetFromAssetID(grp.RootPart.LastOwnerID); | 2607 | //grp.SetFromAssetID(grp.RootPart.LastOwnerID); |
2634 | m_log.DebugFormat( | 2608 | m_log.DebugFormat( |
2635 | "[ATTACHMENT]: Attach to avatar {0} at position {1}", sp.UUID, grp.AbsolutePosition); | 2609 | "[ATTACHMENT]: Attach to avatar {0} at position {1}", sp.UUID, grp.AbsolutePosition); |
2636 | 2610 | ||
2637 | RootPrim.RemFlag(PrimFlags.TemporaryOnRez); | ||
2638 | AttachObject( | 2611 | AttachObject( |
2639 | sp.ControllingClient, grp.LocalId, (uint)0, grp.GroupRotation, grp.AbsolutePosition, false); | 2612 | sp.ControllingClient, grp.LocalId, (uint)0, grp.GroupRotation, grp.AbsolutePosition, false); |
2640 | 2613 | RootPrim.RemFlag(PrimFlags.TemporaryOnRez); | |
2641 | //grp.SendGroupFullUpdate(); | 2614 | grp.SendGroupFullUpdate(); |
2642 | } | 2615 | } |
2643 | else | 2616 | else |
2644 | { | 2617 | { |
2645 | RootPrim.RemFlag(PrimFlags.TemporaryOnRez); | 2618 | RootPrim.RemFlag(PrimFlags.TemporaryOnRez); |
2646 | RootPrim.AddFlag(PrimFlags.TemporaryOnRez); | 2619 | RootPrim.AddFlag(PrimFlags.TemporaryOnRez); |
2647 | } | 2620 | } |
2648 | |||
2649 | Console.WriteLine("BBBB"); | ||
2650 | } | 2621 | } |
2651 | else | 2622 | else |
2652 | { | 2623 | { |
2653 | m_log.DebugFormat("[SCENE]: Adding ordinary object {0} {1}", sceneObject.Name, sceneObject.LocalId); | ||
2654 | |||
2655 | AddRestoredSceneObject(sceneObject, true, false); | 2624 | AddRestoredSceneObject(sceneObject, true, false); |
2656 | 2625 | ||
2657 | if (!Permissions.CanObjectEntry(sceneObject.UUID, | 2626 | if (!Permissions.CanObjectEntry(sceneObject.UUID, |
diff --git a/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs b/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs index 9153069..04626d3 100644 --- a/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs +++ b/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs | |||
@@ -1410,9 +1410,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1410 | // now we have a child agent in this region. Request all interesting data about other (root) agents | 1410 | // now we have a child agent in this region. Request all interesting data about other (root) agents |
1411 | agent.SendInitialFullUpdateToAllClients(); | 1411 | agent.SendInitialFullUpdateToAllClients(); |
1412 | 1412 | ||
1413 | Console.WriteLine("SCS 1"); | ||
1414 | agent.CrossAttachmentsIntoNewRegion(neighbourHandle, true); | 1413 | agent.CrossAttachmentsIntoNewRegion(neighbourHandle, true); |
1415 | Console.WriteLine("SCS 2"); | ||
1416 | 1414 | ||
1417 | // m_scene.SendKillObject(m_localId); | 1415 | // m_scene.SendKillObject(m_localId); |
1418 | 1416 | ||
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs index fb01140..730ec31 100644 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs | |||
@@ -216,15 +216,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
216 | /// If true, we won't persist this object until it changes | 216 | /// If true, we won't persist this object until it changes |
217 | /// If false, we'll persist this object immediately | 217 | /// If false, we'll persist this object immediately |
218 | /// </param> | 218 | /// </param> |
219 | /// <param name="sendClientUpdate"> | ||
220 | /// If true, we send updates to the client to tell it about this object | ||
221 | /// If false, we leave it up to the caller to do this | ||
222 | /// </param> | ||
223 | /// <returns> | 219 | /// <returns> |
224 | /// true if the object was added, false if an object with the same uuid was already in the scene | 220 | /// true if the object was added, false if an object with the same uuid was already in the scene |
225 | /// </returns> | 221 | /// </returns> |
226 | protected internal bool AddRestoredSceneObject( | 222 | protected internal bool AddRestoredSceneObject( |
227 | SceneObjectGroup sceneObject, bool attachToBackup, bool alreadyPersisted, bool sendClientUpdates) | 223 | SceneObjectGroup sceneObject, bool attachToBackup, bool alreadyPersisted) |
228 | { | 224 | { |
229 | // KF: Check for out-of-region, move inside and make static. | 225 | // KF: Check for out-of-region, move inside and make static. |
230 | Vector3 npos = new Vector3(sceneObject.RootPart.GroupPosition.X, | 226 | Vector3 npos = new Vector3(sceneObject.RootPart.GroupPosition.X, |
@@ -256,29 +252,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
256 | sceneObject.HasGroupChanged = true; | 252 | sceneObject.HasGroupChanged = true; |
257 | } | 253 | } |
258 | 254 | ||
259 | return AddSceneObject(sceneObject, attachToBackup, sendClientUpdates); | 255 | return AddSceneObject(sceneObject, attachToBackup, true); |
260 | } | 256 | } |
261 | |||
262 | // /// <summary> | ||
263 | // /// Add an object into the scene that has come from storage | ||
264 | // /// </summary> | ||
265 | // /// <param name="sceneObject"></param> | ||
266 | // /// <param name="attachToBackup"> | ||
267 | // /// If true, changes to the object will be reflected in its persisted data | ||
268 | // /// If false, the persisted data will not be changed even if the object in the scene is changed | ||
269 | // /// </param> | ||
270 | // /// <param name="alreadyPersisted"> | ||
271 | // /// If true, we won't persist this object until it changes | ||
272 | // /// If false, we'll persist this object immediately | ||
273 | // /// </param> | ||
274 | // /// <returns> | ||
275 | // /// true if the object was added, false if an object with the same uuid was already in the scene | ||
276 | // /// </returns> | ||
277 | // protected internal bool AddRestoredSceneObject( | ||
278 | // SceneObjectGroup sceneObject, bool attachToBackup, bool alreadyPersisted) | ||
279 | // { | ||
280 | // AddRestoredSceneObject(sceneObject, attachToBackup, alreadyPersisted, true); | ||
281 | // } | ||
282 | 257 | ||
283 | /// <summary> | 258 | /// <summary> |
284 | /// Add a newly created object to the scene. This will both update the scene, and send information about the | 259 | /// Add a newly created object to the scene. This will both update the scene, and send information about the |
@@ -672,13 +647,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
672 | protected internal bool AttachObject( | 647 | protected internal bool AttachObject( |
673 | IClientAPI remoteClient, uint objectLocalID, uint AttachmentPt, Quaternion rot, Vector3 attachPos, bool silent) | 648 | IClientAPI remoteClient, uint objectLocalID, uint AttachmentPt, Quaternion rot, Vector3 attachPos, bool silent) |
674 | { | 649 | { |
675 | Console.WriteLine("HERE A"); | ||
676 | SceneObjectGroup group = GetGroupByPrim(objectLocalID); | 650 | SceneObjectGroup group = GetGroupByPrim(objectLocalID); |
677 | if (group != null) | 651 | if (group != null) |
678 | { | 652 | { |
679 | if (m_parentScene.Permissions.CanTakeObject(group.UUID, remoteClient.AgentId)) | 653 | if (m_parentScene.Permissions.CanTakeObject(group.UUID, remoteClient.AgentId)) |
680 | { | 654 | { |
681 | Console.WriteLine("HERE -1"); | ||
682 | // If the attachment point isn't the same as the one previously used | 655 | // If the attachment point isn't the same as the one previously used |
683 | // set it's offset position = 0 so that it appears on the attachment point | 656 | // set it's offset position = 0 so that it appears on the attachment point |
684 | // and not in a weird location somewhere unknown. | 657 | // and not in a weird location somewhere unknown. |
@@ -717,12 +690,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
717 | itemId = group.GetFromItemID(); | 690 | itemId = group.GetFromItemID(); |
718 | } | 691 | } |
719 | 692 | ||
720 | Console.WriteLine("HERE 0"); | ||
721 | m_parentScene.AttachObject(remoteClient, AttachmentPt, itemId, group); | 693 | m_parentScene.AttachObject(remoteClient, AttachmentPt, itemId, group); |
722 | 694 | ||
723 | Console.WriteLine("HERE 1"); | ||
724 | group.AttachToAgent(remoteClient.AgentId, AttachmentPt, attachPos, silent); | 695 | group.AttachToAgent(remoteClient.AgentId, AttachmentPt, attachPos, silent); |
725 | Console.WriteLine("HERE 2"); | ||
726 | // In case it is later dropped again, don't let | 696 | // In case it is later dropped again, don't let |
727 | // it get cleaned up | 697 | // it get cleaned up |
728 | // | 698 | // |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index 318357d..edaf1a0 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | |||
@@ -1651,10 +1651,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
1651 | 1651 | ||
1652 | public void SendFullUpdateToClient(IClientAPI remoteClient) | 1652 | public void SendFullUpdateToClient(IClientAPI remoteClient) |
1653 | { | 1653 | { |
1654 | if (IsAttachment) | ||
1655 | m_log.DebugFormat( | ||
1656 | "[SOG]: Sending full update to client {0} for {1} {2}", remoteClient.Name, Name, LocalId); | ||
1657 | |||
1658 | SendPartFullUpdate(remoteClient, RootPart, m_scene.Permissions.GenerateClientFlags(remoteClient.AgentId, RootPart.UUID)); | 1654 | SendPartFullUpdate(remoteClient, RootPart, m_scene.Permissions.GenerateClientFlags(remoteClient.AgentId, RootPart.UUID)); |
1659 | 1655 | ||
1660 | lockPartsForRead(true); | 1656 | lockPartsForRead(true); |
@@ -1677,9 +1673,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
1677 | /// <param name="part"></param> | 1673 | /// <param name="part"></param> |
1678 | internal void SendPartFullUpdate(IClientAPI remoteClient, SceneObjectPart part, uint clientFlags) | 1674 | internal void SendPartFullUpdate(IClientAPI remoteClient, SceneObjectPart part, uint clientFlags) |
1679 | { | 1675 | { |
1680 | if (IsAttachment) | 1676 | // m_log.DebugFormat( |
1681 | m_log.DebugFormat( | 1677 | // "[SOG]: Sending part full update to {0} for {1} {2}", remoteClient.Name, part.Name, part.LocalId); |
1682 | "[SOG]: Sending part full update to {0} for {1} {2}", remoteClient.Name, part.Name, part.LocalId); | ||
1683 | 1678 | ||
1684 | if (m_rootPart.UUID == part.UUID) | 1679 | if (m_rootPart.UUID == part.UUID) |
1685 | { | 1680 | { |
@@ -2191,8 +2186,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2191 | 2186 | ||
2192 | public void ScheduleFullUpdateToAvatar(ScenePresence presence) | 2187 | public void ScheduleFullUpdateToAvatar(ScenePresence presence) |
2193 | { | 2188 | { |
2194 | if (IsAttachment) | 2189 | // m_log.DebugFormat("[SOG]: Scheduling full update for {0} {1} just to avatar {2}", Name, UUID, presence.Name); |
2195 | m_log.DebugFormat("[SOG]: Scheduling full update for {0} {1} just to avatar {2}", Name, UUID, presence.Name); | ||
2196 | 2190 | ||
2197 | RootPart.AddFullUpdateToAvatar(presence); | 2191 | RootPart.AddFullUpdateToAvatar(presence); |
2198 | 2192 | ||
@@ -2228,8 +2222,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2228 | /// </summary> | 2222 | /// </summary> |
2229 | public void ScheduleGroupForFullUpdate() | 2223 | public void ScheduleGroupForFullUpdate() |
2230 | { | 2224 | { |
2231 | if (IsAttachment) | 2225 | // m_log.DebugFormat("[SOG]: Scheduling full update for {0} {1}", Name, UUID); |
2232 | m_log.DebugFormat("[SOG]: Scheduling full update for {0} {1}", Name, UUID); | ||
2233 | 2226 | ||
2234 | checkAtTargets(); | 2227 | checkAtTargets(); |
2235 | RootPart.ScheduleFullUpdate(); | 2228 | RootPart.ScheduleFullUpdate(); |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index 3a101cc..548a64f 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | |||
@@ -1270,17 +1270,16 @@ namespace OpenSim.Region.Framework.Scenes | |||
1270 | /// Tell all scene presences that they should send updates for this part to their clients | 1270 | /// Tell all scene presences that they should send updates for this part to their clients |
1271 | /// </summary> | 1271 | /// </summary> |
1272 | public void AddFullUpdateToAllAvatars() | 1272 | public void AddFullUpdateToAllAvatars() |
1273 | { | 1273 | { |
1274 | ScenePresence[] avatars = m_parentGroup.Scene.GetScenePresences(); | 1274 | ScenePresence[] avatars = m_parentGroup.Scene.GetScenePresences(); |
1275 | for (int i = 0; i < avatars.Length; i++) | 1275 | for (int i = 0; i < avatars.Length; i++) |
1276 | AddFullUpdateToAvatar(avatars[i]); | 1276 | { |
1277 | avatars[i].SceneViewer.QueuePartForUpdate(this); | ||
1278 | } | ||
1277 | } | 1279 | } |
1278 | 1280 | ||
1279 | public void AddFullUpdateToAvatar(ScenePresence presence) | 1281 | public void AddFullUpdateToAvatar(ScenePresence presence) |
1280 | { | 1282 | { |
1281 | if (IsAttachment) | ||
1282 | m_log.DebugFormat("AddFullUpdateToAllAvatar() {0} for {1} {2}", presence.Name, Name, LocalId); | ||
1283 | |||
1284 | presence.SceneViewer.QueuePartForUpdate(this); | 1283 | presence.SceneViewer.QueuePartForUpdate(this); |
1285 | } | 1284 | } |
1286 | 1285 | ||
@@ -1299,14 +1298,13 @@ namespace OpenSim.Region.Framework.Scenes | |||
1299 | { | 1298 | { |
1300 | ScenePresence[] avatars = m_parentGroup.Scene.GetScenePresences(); | 1299 | ScenePresence[] avatars = m_parentGroup.Scene.GetScenePresences(); |
1301 | for (int i = 0; i < avatars.Length; i++) | 1300 | for (int i = 0; i < avatars.Length; i++) |
1302 | AddTerseUpdateToAvatar(avatars[i]); | 1301 | { |
1302 | avatars[i].SceneViewer.QueuePartForUpdate(this); | ||
1303 | } | ||
1303 | } | 1304 | } |
1304 | 1305 | ||
1305 | public void AddTerseUpdateToAvatar(ScenePresence presence) | 1306 | public void AddTerseUpdateToAvatar(ScenePresence presence) |
1306 | { | 1307 | { |
1307 | if (IsAttachment) | ||
1308 | m_log.DebugFormat("AddTerseUpdateToAvatar() {0} for {1} {2}", presence.Name, Name, LocalId); | ||
1309 | |||
1310 | presence.SceneViewer.QueuePartForUpdate(this); | 1308 | presence.SceneViewer.QueuePartForUpdate(this); |
1311 | } | 1309 | } |
1312 | 1310 | ||
@@ -2715,8 +2713,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2715 | /// </summary> | 2713 | /// </summary> |
2716 | public void ScheduleFullUpdate() | 2714 | public void ScheduleFullUpdate() |
2717 | { | 2715 | { |
2718 | if (IsAttachment) | 2716 | // m_log.DebugFormat("[SCENE OBJECT PART]: Scheduling full update for {0} {1}", Name, LocalId); |
2719 | m_log.DebugFormat("[SOP]: Scheduling full update for {0} {1}", Name, LocalId); | ||
2720 | 2717 | ||
2721 | if (m_parentGroup != null) | 2718 | if (m_parentGroup != null) |
2722 | { | 2719 | { |
@@ -2829,10 +2826,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
2829 | /// <param name="remoteClient"></param> | 2826 | /// <param name="remoteClient"></param> |
2830 | public void SendFullUpdate(IClientAPI remoteClient, uint clientFlags) | 2827 | public void SendFullUpdate(IClientAPI remoteClient, uint clientFlags) |
2831 | { | 2828 | { |
2832 | if (IsAttachment) | ||
2833 | m_log.DebugFormat( | ||
2834 | "[SCENE OBJECT PART]: Sending part full update to {0} for {1} {2}", remoteClient.Name, Name, LocalId); | ||
2835 | |||
2836 | m_parentGroup.SendPartFullUpdate(remoteClient, this, clientFlags); | 2829 | m_parentGroup.SendPartFullUpdate(remoteClient, this, clientFlags); |
2837 | } | 2830 | } |
2838 | 2831 | ||
@@ -2841,10 +2834,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
2841 | /// </summary> | 2834 | /// </summary> |
2842 | public void SendFullUpdateToAllClients() | 2835 | public void SendFullUpdateToAllClients() |
2843 | { | 2836 | { |
2844 | if (IsAttachment) | ||
2845 | m_log.DebugFormat( | ||
2846 | "[SCENE OBJECT PART]: Sending full update for {0} {1} for all clients", Name, LocalId); | ||
2847 | |||
2848 | ScenePresence[] avatars = m_parentGroup.Scene.GetScenePresences(); | 2837 | ScenePresence[] avatars = m_parentGroup.Scene.GetScenePresences(); |
2849 | for (int i = 0; i < avatars.Length; i++) | 2838 | for (int i = 0; i < avatars.Length; i++) |
2850 | { | 2839 | { |
@@ -2856,10 +2845,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
2856 | 2845 | ||
2857 | public void SendFullUpdateToAllClientsExcept(UUID agentID) | 2846 | public void SendFullUpdateToAllClientsExcept(UUID agentID) |
2858 | { | 2847 | { |
2859 | if (IsAttachment) | ||
2860 | m_log.DebugFormat( | ||
2861 | "[SCENE OBJECT PART]: Sending full update for {0} {1} to all clients except {2}", Name, LocalId, agentID); | ||
2862 | |||
2863 | ScenePresence[] avatars = m_parentGroup.Scene.GetScenePresences(); | 2848 | ScenePresence[] avatars = m_parentGroup.Scene.GetScenePresences(); |
2864 | for (int i = 0; i < avatars.Length; i++) | 2849 | for (int i = 0; i < avatars.Length; i++) |
2865 | { | 2850 | { |
@@ -2968,9 +2953,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
2968 | { | 2953 | { |
2969 | if (m_updateFlag == 2) // is a new prim, just created/reloaded or has major changes | 2954 | if (m_updateFlag == 2) // is a new prim, just created/reloaded or has major changes |
2970 | { | 2955 | { |
2971 | if (IsAttachment) | ||
2972 | m_log.DebugFormat("[SOP]: Sending scheduled full update for {0} {1}", Name, LocalId); | ||
2973 | |||
2974 | AddFullUpdateToAllAvatars(); | 2956 | AddFullUpdateToAllAvatars(); |
2975 | m_updateFlag = 0; //Same here | 2957 | m_updateFlag = 0; //Same here |
2976 | } | 2958 | } |
diff --git a/OpenSim/Region/Framework/Scenes/SceneViewer.cs b/OpenSim/Region/Framework/Scenes/SceneViewer.cs index f88605b..1cff0eb 100644 --- a/OpenSim/Region/Framework/Scenes/SceneViewer.cs +++ b/OpenSim/Region/Framework/Scenes/SceneViewer.cs | |||
@@ -27,7 +27,6 @@ | |||
27 | 27 | ||
28 | using System; | 28 | using System; |
29 | using System.Collections.Generic; | 29 | using System.Collections.Generic; |
30 | using System.Reflection; | ||
31 | using OpenMetaverse; | 30 | using OpenMetaverse; |
32 | using log4net; | 31 | using log4net; |
33 | using OpenSim.Framework; | 32 | using OpenSim.Framework; |
@@ -40,8 +39,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
40 | { | 39 | { |
41 | public class SceneViewer : ISceneViewer | 40 | public class SceneViewer : ISceneViewer |
42 | { | 41 | { |
43 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | ||
44 | |||
45 | protected ScenePresence m_presence; | 42 | protected ScenePresence m_presence; |
46 | protected UpdateQueue m_partsUpdateQueue = new UpdateQueue(); | 43 | protected UpdateQueue m_partsUpdateQueue = new UpdateQueue(); |
47 | protected Queue<SceneObjectGroup> m_pendingObjects; | 44 | protected Queue<SceneObjectGroup> m_pendingObjects; |
@@ -63,9 +60,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
63 | /// <param name="part"></param> | 60 | /// <param name="part"></param> |
64 | public void QueuePartForUpdate(SceneObjectPart part) | 61 | public void QueuePartForUpdate(SceneObjectPart part) |
65 | { | 62 | { |
66 | if (part.IsAttachment) | ||
67 | m_log.DebugFormat("[SCENE VIEWER]: Queueing part {0} {1} for update", part.Name, part.LocalId); | ||
68 | |||
69 | lock (m_partsUpdateQueue) | 63 | lock (m_partsUpdateQueue) |
70 | { | 64 | { |
71 | m_partsUpdateQueue.Enqueue(part); | 65 | m_partsUpdateQueue.Enqueue(part); |
@@ -140,7 +134,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
140 | } | 134 | } |
141 | else if (update.LastTerseUpdateTime <= part.TimeStampTerse) | 135 | else if (update.LastTerseUpdateTime <= part.TimeStampTerse) |
142 | { | 136 | { |
143 | // m_log.DebugFormat(AddFullUpdateToAvatar | 137 | // m_log.DebugFormat( |
144 | // "[SCENE PRESENCE]: Tersely updating prim {0}, {1} - part timestamp {2}", | 138 | // "[SCENE PRESENCE]: Tersely updating prim {0}, {1} - part timestamp {2}", |
145 | // part.Name, part.UUID, part.TimeStampTerse); | 139 | // part.Name, part.UUID, part.TimeStampTerse); |
146 | 140 | ||