diff options
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | 44 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.cs | 40 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneGraph.cs | 62 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 35 | ||||
-rwxr-xr-x | bin/OpenSim.exe.config | 2 |
5 files changed, 139 insertions, 44 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index c6cee75..5b21332 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | |||
@@ -2339,9 +2339,18 @@ namespace OpenSim.Region.Framework.Scenes | |||
2339 | EventManager.TriggerOnAttach(localID, itemID, avatarID); | 2339 | EventManager.TriggerOnAttach(localID, itemID, avatarID); |
2340 | } | 2340 | } |
2341 | 2341 | ||
2342 | public UUID RezSingleAttachment(IClientAPI remoteClient, UUID itemID, | 2342 | /// <summary> |
2343 | uint AttachmentPt) | 2343 | /// Called when the client receives a request to rez a single attachment on to the avatar from inventory |
2344 | /// (RezSingleAttachmentFromInv packet). | ||
2345 | /// </summary> | ||
2346 | /// <param name="remoteClient"></param> | ||
2347 | /// <param name="itemID"></param> | ||
2348 | /// <param name="AttachmentPt"></param> | ||
2349 | /// <returns></returns> | ||
2350 | public UUID RezSingleAttachment(IClientAPI remoteClient, UUID itemID, uint AttachmentPt) | ||
2344 | { | 2351 | { |
2352 | m_log.DebugFormat("[USER INVENTORY]: Rezzing single attachment from item {0} for {1}", itemID, remoteClient.Name); | ||
2353 | |||
2345 | SceneObjectGroup att = m_sceneGraph.RezSingleAttachment(remoteClient, itemID, AttachmentPt); | 2354 | SceneObjectGroup att = m_sceneGraph.RezSingleAttachment(remoteClient, itemID, AttachmentPt); |
2346 | 2355 | ||
2347 | if (att == null) | 2356 | if (att == null) |
@@ -2353,9 +2362,20 @@ namespace OpenSim.Region.Framework.Scenes | |||
2353 | return RezSingleAttachment(att, remoteClient, itemID, AttachmentPt); | 2362 | return RezSingleAttachment(att, remoteClient, itemID, AttachmentPt); |
2354 | } | 2363 | } |
2355 | 2364 | ||
2356 | public UUID RezSingleAttachment(SceneObjectGroup att, | 2365 | /// <summary> |
2357 | IClientAPI remoteClient, UUID itemID, uint AttachmentPt) | 2366 | /// Update the user inventory to reflect an attachment |
2367 | /// </summary> | ||
2368 | /// <param name="att"></param> | ||
2369 | /// <param name="remoteClient"></param> | ||
2370 | /// <param name="itemID"></param> | ||
2371 | /// <param name="AttachmentPt"></param> | ||
2372 | /// <returns></returns> | ||
2373 | public UUID RezSingleAttachment(SceneObjectGroup att, IClientAPI remoteClient, UUID itemID, uint AttachmentPt) | ||
2358 | { | 2374 | { |
2375 | m_log.DebugFormat( | ||
2376 | "[USER INVENTORY]: Updating inventory of {0} to show attachment of {1} (item ID {2})", | ||
2377 | remoteClient.Name, att.Name, itemID); | ||
2378 | |||
2359 | if (!att.IsDeleted) | 2379 | if (!att.IsDeleted) |
2360 | AttachmentPt = att.RootPart.AttachmentPoint; | 2380 | AttachmentPt = att.RootPart.AttachmentPoint; |
2361 | 2381 | ||
@@ -2394,8 +2414,19 @@ namespace OpenSim.Region.Framework.Scenes | |||
2394 | return m_sceneGraph.AttachObject(controllingClient, localID, attachPoint, rot, pos, silent); | 2414 | return m_sceneGraph.AttachObject(controllingClient, localID, attachPoint, rot, pos, silent); |
2395 | } | 2415 | } |
2396 | 2416 | ||
2417 | /// <summary> | ||
2418 | /// This registers the item as attached in a user's inventory | ||
2419 | /// </summary> | ||
2420 | /// <param name="remoteClient"></param> | ||
2421 | /// <param name="AttachmentPt"></param> | ||
2422 | /// <param name="itemID"></param> | ||
2423 | /// <param name="att"></param> | ||
2397 | public void AttachObject(IClientAPI remoteClient, uint AttachmentPt, UUID itemID, SceneObjectGroup att) | 2424 | public void AttachObject(IClientAPI remoteClient, uint AttachmentPt, UUID itemID, SceneObjectGroup att) |
2398 | { | 2425 | { |
2426 | // m_log.DebugFormat( | ||
2427 | // "[USER INVENTORY]: Updating attachment {0} for {1} at {2} using item ID {3}", | ||
2428 | // att.Name, remoteClient.Name, AttachmentPt, itemID); | ||
2429 | |||
2399 | if (UUID.Zero == itemID) | 2430 | if (UUID.Zero == itemID) |
2400 | { | 2431 | { |
2401 | m_log.Error("[SCENE INVENTORY]: Unable to save attachment. Error inventory item ID."); | 2432 | m_log.Error("[SCENE INVENTORY]: Unable to save attachment. Error inventory item ID."); |
@@ -2423,10 +2454,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2423 | presence.Appearance.SetAttachment((int)AttachmentPt, itemID, item.AssetID /*att.UUID*/); | 2454 | presence.Appearance.SetAttachment((int)AttachmentPt, itemID, item.AssetID /*att.UUID*/); |
2424 | 2455 | ||
2425 | if (m_AvatarFactory != null) | 2456 | if (m_AvatarFactory != null) |
2426 | { | ||
2427 | m_AvatarFactory.UpdateDatabase(remoteClient.AgentId, presence.Appearance); | 2457 | m_AvatarFactory.UpdateDatabase(remoteClient.AgentId, presence.Appearance); |
2428 | } | ||
2429 | |||
2430 | } | 2458 | } |
2431 | } | 2459 | } |
2432 | 2460 | ||
@@ -2509,6 +2537,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2509 | { | 2537 | { |
2510 | sog.SetOwnerId(ownerID); | 2538 | sog.SetOwnerId(ownerID); |
2511 | sog.SetGroup(groupID, remoteClient); | 2539 | sog.SetGroup(groupID, remoteClient); |
2540 | sog.ScheduleGroupForFullUpdate(); | ||
2512 | 2541 | ||
2513 | foreach (SceneObjectPart child in sog.Children.Values) | 2542 | foreach (SceneObjectPart child in sog.Children.Values) |
2514 | child.Inventory.ChangeInventoryOwner(ownerID); | 2543 | child.Inventory.ChangeInventoryOwner(ownerID); |
@@ -2530,6 +2559,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2530 | sog.SetOwnerId(groupID); | 2559 | sog.SetOwnerId(groupID); |
2531 | sog.ApplyNextOwnerPermissions(); | 2560 | sog.ApplyNextOwnerPermissions(); |
2532 | } | 2561 | } |
2562 | |||
2533 | } | 2563 | } |
2534 | 2564 | ||
2535 | foreach (uint localID in localIDs) | 2565 | foreach (uint localID in localIDs) |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 41fd1e1..7796b8d 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -1813,14 +1813,22 @@ namespace OpenSim.Region.Framework.Scenes | |||
1813 | //m_log.DebugFormat( | 1813 | //m_log.DebugFormat( |
1814 | // "[SCENE]: Scene.AddNewPrim() pcode {0} called for {1} in {2}", shape.PCode, ownerID, RegionInfo.RegionName); | 1814 | // "[SCENE]: Scene.AddNewPrim() pcode {0} called for {1} in {2}", shape.PCode, ownerID, RegionInfo.RegionName); |
1815 | 1815 | ||
1816 | SceneObjectGroup sceneObject = null; | ||
1817 | |||
1816 | // If an entity creator has been registered for this prim type then use that | 1818 | // If an entity creator has been registered for this prim type then use that |
1817 | if (m_entityCreators.ContainsKey((PCode)shape.PCode)) | 1819 | if (m_entityCreators.ContainsKey((PCode)shape.PCode)) |
1818 | return m_entityCreators[(PCode)shape.PCode].CreateEntity(ownerID, groupID, pos, rot, shape); | 1820 | { |
1821 | sceneObject = m_entityCreators[(PCode)shape.PCode].CreateEntity(ownerID, groupID, pos, rot, shape); | ||
1822 | } | ||
1823 | else | ||
1824 | { | ||
1825 | // Otherwise, use this default creation code; | ||
1826 | sceneObject = new SceneObjectGroup(ownerID, pos, rot, shape); | ||
1827 | AddNewSceneObject(sceneObject, true); | ||
1828 | sceneObject.SetGroup(groupID, null); | ||
1829 | } | ||
1819 | 1830 | ||
1820 | // Otherwise, use this default creation code; | 1831 | sceneObject.ScheduleGroupForFullUpdate(); |
1821 | SceneObjectGroup sceneObject = new SceneObjectGroup(ownerID, pos, rot, shape); | ||
1822 | AddNewSceneObject(sceneObject, true); | ||
1823 | sceneObject.SetGroup(groupID, null); | ||
1824 | 1832 | ||
1825 | return sceneObject; | 1833 | return sceneObject; |
1826 | } | 1834 | } |
@@ -1848,7 +1856,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1848 | } | 1856 | } |
1849 | 1857 | ||
1850 | /// <summary> | 1858 | /// <summary> |
1851 | /// Add a newly created object to the scene | 1859 | /// Add a newly created object to the scene. Updates are also sent to viewers. |
1852 | /// </summary> | 1860 | /// </summary> |
1853 | /// <param name="sceneObject"></param> | 1861 | /// <param name="sceneObject"></param> |
1854 | /// <param name="attachToBackup"> | 1862 | /// <param name="attachToBackup"> |
@@ -1857,8 +1865,25 @@ namespace OpenSim.Region.Framework.Scenes | |||
1857 | /// </param> | 1865 | /// </param> |
1858 | public bool AddNewSceneObject(SceneObjectGroup sceneObject, bool attachToBackup) | 1866 | public bool AddNewSceneObject(SceneObjectGroup sceneObject, bool attachToBackup) |
1859 | { | 1867 | { |
1860 | return m_sceneGraph.AddNewSceneObject(sceneObject, attachToBackup); | 1868 | return AddNewSceneObject(sceneObject, attachToBackup, true); |
1861 | } | 1869 | } |
1870 | |||
1871 | /// <summary> | ||
1872 | /// Add a newly created object to the scene | ||
1873 | /// </summary> | ||
1874 | /// <param name="sceneObject"></param> | ||
1875 | /// <param name="attachToBackup"> | ||
1876 | /// If true, the object is made persistent into the scene. | ||
1877 | /// If false, the object will not persist over server restarts | ||
1878 | /// </param> | ||
1879 | /// <param name="sendClientUpdates"> | ||
1880 | /// If true, updates for the new scene object are sent to all viewers in range. | ||
1881 | /// If false, it is left to the caller to schedule the update | ||
1882 | /// </param> | ||
1883 | public bool AddNewSceneObject(SceneObjectGroup sceneObject, bool attachToBackup, bool sendClientUpdates) | ||
1884 | { | ||
1885 | return m_sceneGraph.AddNewSceneObject(sceneObject, attachToBackup, sendClientUpdates); | ||
1886 | } | ||
1862 | 1887 | ||
1863 | /// <summary> | 1888 | /// <summary> |
1864 | /// Delete every object from the scene | 1889 | /// Delete every object from the scene |
@@ -3322,7 +3347,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
3322 | } | 3347 | } |
3323 | else | 3348 | else |
3324 | m_log.Debug("[SCENE]: Unable to register with InterregionCommsIn"); | 3349 | m_log.Debug("[SCENE]: Unable to register with InterregionCommsIn"); |
3325 | |||
3326 | } | 3350 | } |
3327 | 3351 | ||
3328 | /// <summary> | 3352 | /// <summary> |
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs index 321cc45..d31b45e 100644 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs | |||
@@ -228,7 +228,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
228 | sceneObject.HasGroupChanged = true; | 228 | sceneObject.HasGroupChanged = true; |
229 | } | 229 | } |
230 | 230 | ||
231 | return AddSceneObject(sceneObject, attachToBackup); | 231 | return AddSceneObject(sceneObject, attachToBackup, true); |
232 | } | 232 | } |
233 | 233 | ||
234 | /// <summary> | 234 | /// <summary> |
@@ -243,12 +243,12 @@ namespace OpenSim.Region.Framework.Scenes | |||
243 | /// <returns> | 243 | /// <returns> |
244 | /// true if the object was added, false if an object with the same uuid was already in the scene | 244 | /// true if the object was added, false if an object with the same uuid was already in the scene |
245 | /// </returns> | 245 | /// </returns> |
246 | protected internal bool AddNewSceneObject(SceneObjectGroup sceneObject, bool attachToBackup) | 246 | protected internal bool AddNewSceneObject(SceneObjectGroup sceneObject, bool attachToBackup, bool sendClientUpdates) |
247 | { | 247 | { |
248 | // Ensure that we persist this new scene object | 248 | // Ensure that we persist this new scene object |
249 | sceneObject.HasGroupChanged = true; | 249 | sceneObject.HasGroupChanged = true; |
250 | 250 | ||
251 | return AddSceneObject(sceneObject, attachToBackup); | 251 | return AddSceneObject(sceneObject, attachToBackup, sendClientUpdates); |
252 | } | 252 | } |
253 | 253 | ||
254 | /// <summary> | 254 | /// <summary> |
@@ -260,12 +260,19 @@ namespace OpenSim.Region.Framework.Scenes | |||
260 | /// If true, the object is made persistent into the scene. | 260 | /// If true, the object is made persistent into the scene. |
261 | /// If false, the object will not persist over server restarts | 261 | /// If false, the object will not persist over server restarts |
262 | /// </param> | 262 | /// </param> |
263 | /// <returns>true if the object was added, false if an object with the same uuid was already in the scene | 263 | /// <param name="sendClientUpdates"> |
264 | /// If true, updates for the new scene object are sent to all viewers in range. | ||
265 | /// If false, it is left to the caller to schedule the update | ||
266 | /// </param> | ||
267 | /// <returns> | ||
268 | /// true if the object was added, false if an object with the same uuid was already in the scene | ||
264 | /// </returns> | 269 | /// </returns> |
265 | protected bool AddSceneObject(SceneObjectGroup sceneObject, bool attachToBackup) | 270 | protected bool AddSceneObject(SceneObjectGroup sceneObject, bool attachToBackup, bool sendClientUpdates) |
266 | { | 271 | { |
267 | if (sceneObject == null || sceneObject.RootPart == null || sceneObject.RootPart.UUID == UUID.Zero) | 272 | if (sceneObject == null || sceneObject.RootPart == null || sceneObject.RootPart.UUID == UUID.Zero) |
268 | return false; | 273 | return false; |
274 | |||
275 | bool alreadyExisted = false; | ||
269 | 276 | ||
270 | if (m_parentScene.m_clampPrimSize) | 277 | if (m_parentScene.m_clampPrimSize) |
271 | { | 278 | { |
@@ -286,6 +293,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
286 | 293 | ||
287 | sceneObject.AttachToScene(m_parentScene); | 294 | sceneObject.AttachToScene(m_parentScene); |
288 | 295 | ||
296 | if (sendClientUpdates) | ||
297 | sceneObject.ScheduleGroupForFullUpdate(); | ||
298 | |||
289 | lock (sceneObject) | 299 | lock (sceneObject) |
290 | { | 300 | { |
291 | if (!Entities.ContainsKey(sceneObject.UUID)) | 301 | if (!Entities.ContainsKey(sceneObject.UUID)) |
@@ -309,12 +319,14 @@ namespace OpenSim.Region.Framework.Scenes | |||
309 | SceneObjectGroupsByLocalID[part.LocalId] = sceneObject; | 319 | SceneObjectGroupsByLocalID[part.LocalId] = sceneObject; |
310 | } | 320 | } |
311 | } | 321 | } |
312 | 322 | } | |
313 | return true; | 323 | else |
324 | { | ||
325 | alreadyExisted = true; | ||
314 | } | 326 | } |
315 | } | 327 | } |
316 | 328 | ||
317 | return false; | 329 | return alreadyExisted; |
318 | } | 330 | } |
319 | 331 | ||
320 | /// <summary> | 332 | /// <summary> |
@@ -521,26 +533,34 @@ namespace OpenSim.Region.Framework.Scenes | |||
521 | itemID, Vector3.Zero, Vector3.Zero, UUID.Zero, (byte)1, true, | 533 | itemID, Vector3.Zero, Vector3.Zero, UUID.Zero, (byte)1, true, |
522 | false, false, remoteClient.AgentId, true); | 534 | false, false, remoteClient.AgentId, true); |
523 | 535 | ||
536 | // m_log.DebugFormat( | ||
537 | // "[SCENE GRAPH]: Retrieved single object {0} for attachment to {1} on point {2}", | ||
538 | // objatt.Name, remoteClient.Name, AttachmentPt); | ||
539 | |||
524 | if (objatt != null) | 540 | if (objatt != null) |
525 | { | 541 | { |
526 | bool tainted = false; | 542 | bool tainted = false; |
527 | if (AttachmentPt != 0 && AttachmentPt != objatt.GetAttachmentPoint()) | 543 | if (AttachmentPt != 0 && AttachmentPt != objatt.GetAttachmentPoint()) |
528 | tainted = true; | 544 | tainted = true; |
529 | 545 | ||
530 | if (AttachObject( | 546 | AttachObject(remoteClient, objatt.LocalId, AttachmentPt, Quaternion.Identity, objatt.AbsolutePosition, false); |
531 | remoteClient, objatt.LocalId, AttachmentPt, Quaternion.Identity, objatt.AbsolutePosition, false)) | 547 | //objatt.ScheduleGroupForFullUpdate(); |
532 | { | ||
533 | objatt.ScheduleGroupForFullUpdate(); | ||
534 | if (tainted) | ||
535 | objatt.HasGroupChanged = true; | ||
536 | |||
537 | // Fire after attach, so we don't get messy perms dialogs | ||
538 | // 3 == AttachedRez | ||
539 | objatt.CreateScriptInstances(0, true, m_parentScene.DefaultScriptEngine, 3); | ||
540 | 548 | ||
541 | // Do this last so that event listeners have access to all the effects of the attachment | 549 | if (tainted) |
542 | m_parentScene.EventManager.TriggerOnAttach(objatt.LocalId, itemID, remoteClient.AgentId); | 550 | objatt.HasGroupChanged = true; |
543 | } | 551 | |
552 | // Fire after attach, so we don't get messy perms dialogs | ||
553 | // 3 == AttachedRez | ||
554 | objatt.CreateScriptInstances(0, true, m_parentScene.DefaultScriptEngine, 3); | ||
555 | |||
556 | // Do this last so that event listeners have access to all the effects of the attachment | ||
557 | m_parentScene.EventManager.TriggerOnAttach(objatt.LocalId, itemID, remoteClient.AgentId); | ||
558 | } | ||
559 | else | ||
560 | { | ||
561 | m_log.WarnFormat( | ||
562 | "[SCENE GRAPH]: Could not retrieve item {0} for attaching to avatar {1} at point {2}", | ||
563 | itemID, remoteClient.Name, AttachmentPt); | ||
544 | } | 564 | } |
545 | 565 | ||
546 | return objatt; | 566 | return objatt; |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index c5a6171..c14b39a 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | |||
@@ -567,8 +567,10 @@ namespace OpenSim.Region.Framework.Scenes | |||
567 | } | 567 | } |
568 | 568 | ||
569 | ApplyPhysics(m_scene.m_physicalPrim); | 569 | ApplyPhysics(m_scene.m_physicalPrim); |
570 | 570 | ||
571 | ScheduleGroupForFullUpdate(); | 571 | // Don't trigger the update here - otherwise some client issues occur when multiple updates are scheduled |
572 | // for the same object with very different properties. The caller must schedule the update. | ||
573 | //ScheduleGroupForFullUpdate(); | ||
572 | } | 574 | } |
573 | 575 | ||
574 | public Vector3 GroupScale() | 576 | public Vector3 GroupScale() |
@@ -956,10 +958,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
956 | // don't attach attachments to child agents | 958 | // don't attach attachments to child agents |
957 | if (avatar.IsChildAgent) return; | 959 | if (avatar.IsChildAgent) return; |
958 | 960 | ||
961 | // m_log.DebugFormat("[SOG]: Adding attachment {0} to avatar {1}", Name, avatar.Name); | ||
962 | |||
959 | DetachFromBackup(); | 963 | DetachFromBackup(); |
960 | 964 | ||
961 | // Remove from database and parcel prim count | 965 | // Remove from database and parcel prim count |
962 | // | ||
963 | m_scene.DeleteFromStorage(UUID); | 966 | m_scene.DeleteFromStorage(UUID); |
964 | m_scene.EventManager.TriggerParcelPrimCountTainted(); | 967 | m_scene.EventManager.TriggerParcelPrimCountTainted(); |
965 | 968 | ||
@@ -985,7 +988,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
985 | SetAttachmentPoint(Convert.ToByte(attachmentpoint)); | 988 | SetAttachmentPoint(Convert.ToByte(attachmentpoint)); |
986 | 989 | ||
987 | avatar.AddAttachment(this); | 990 | avatar.AddAttachment(this); |
988 | m_log.Debug("[SOG]: Added attachment " + UUID + " to avatar " + avatar.UUID); | ||
989 | 991 | ||
990 | if (!silent) | 992 | if (!silent) |
991 | { | 993 | { |
@@ -1002,6 +1004,12 @@ namespace OpenSim.Region.Framework.Scenes | |||
1002 | ScheduleGroupForFullUpdate(); | 1004 | ScheduleGroupForFullUpdate(); |
1003 | } | 1005 | } |
1004 | } | 1006 | } |
1007 | else | ||
1008 | { | ||
1009 | m_log.WarnFormat( | ||
1010 | "[SOG]: Tried to add attachment {0} to avatar with UUID {1} in region {2} but the avatar is not present", | ||
1011 | UUID, agentID, Scene.RegionInfo.RegionName); | ||
1012 | } | ||
1005 | } | 1013 | } |
1006 | 1014 | ||
1007 | public byte GetAttachmentPoint() | 1015 | public byte GetAttachmentPoint() |
@@ -1986,6 +1994,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
1986 | 1994 | ||
1987 | public void ScheduleFullUpdateToAvatar(ScenePresence presence) | 1995 | public void ScheduleFullUpdateToAvatar(ScenePresence presence) |
1988 | { | 1996 | { |
1997 | // m_log.DebugFormat("[SOG]: Scheduling full update for {0} {1} just to avatar {2}", Name, UUID, presence.Name); | ||
1998 | |||
1989 | RootPart.AddFullUpdateToAvatar(presence); | 1999 | RootPart.AddFullUpdateToAvatar(presence); |
1990 | 2000 | ||
1991 | lock (m_parts) | 2001 | lock (m_parts) |
@@ -2000,6 +2010,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
2000 | 2010 | ||
2001 | public void ScheduleTerseUpdateToAvatar(ScenePresence presence) | 2011 | public void ScheduleTerseUpdateToAvatar(ScenePresence presence) |
2002 | { | 2012 | { |
2013 | // m_log.DebugFormat("[SOG]: Scheduling terse update for {0} {1} just to avatar {2}", Name, UUID, presence.Name); | ||
2014 | |||
2003 | lock (m_parts) | 2015 | lock (m_parts) |
2004 | { | 2016 | { |
2005 | foreach (SceneObjectPart part in m_parts.Values) | 2017 | foreach (SceneObjectPart part in m_parts.Values) |
@@ -2014,6 +2026,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
2014 | /// </summary> | 2026 | /// </summary> |
2015 | public void ScheduleGroupForFullUpdate() | 2027 | public void ScheduleGroupForFullUpdate() |
2016 | { | 2028 | { |
2029 | // m_log.DebugFormat("[SOG]: Scheduling full update for {0} {1}", Name, UUID); | ||
2030 | |||
2017 | checkAtTargets(); | 2031 | checkAtTargets(); |
2018 | RootPart.ScheduleFullUpdate(); | 2032 | RootPart.ScheduleFullUpdate(); |
2019 | 2033 | ||
@@ -2032,6 +2046,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
2032 | /// </summary> | 2046 | /// </summary> |
2033 | public void ScheduleGroupForTerseUpdate() | 2047 | public void ScheduleGroupForTerseUpdate() |
2034 | { | 2048 | { |
2049 | // m_log.DebugFormat("[SOG]: Scheduling terse update for {0} {1}", Name, UUID); | ||
2050 | |||
2035 | lock (m_parts) | 2051 | lock (m_parts) |
2036 | { | 2052 | { |
2037 | foreach (SceneObjectPart part in m_parts.Values) | 2053 | foreach (SceneObjectPart part in m_parts.Values) |
@@ -2045,9 +2061,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
2045 | /// Immediately send a full update for this scene object. | 2061 | /// Immediately send a full update for this scene object. |
2046 | /// </summary> | 2062 | /// </summary> |
2047 | public void SendGroupFullUpdate() | 2063 | public void SendGroupFullUpdate() |
2048 | { | 2064 | { |
2049 | if (IsDeleted) | 2065 | if (IsDeleted) |
2050 | return; | 2066 | return; |
2067 | |||
2068 | // m_log.DebugFormat("[SOG]: Sending immediate full group update for {0} {1}", Name, UUID); | ||
2051 | 2069 | ||
2052 | RootPart.SendFullUpdateToAllClients(); | 2070 | RootPart.SendFullUpdateToAllClients(); |
2053 | 2071 | ||
@@ -2064,7 +2082,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2064 | /// <summary> | 2082 | /// <summary> |
2065 | /// Immediately send an update for this scene object's root prim only. | 2083 | /// Immediately send an update for this scene object's root prim only. |
2066 | /// This is for updates regarding the object as a whole, and none of its parts in particular. | 2084 | /// This is for updates regarding the object as a whole, and none of its parts in particular. |
2067 | /// Note: this may not be cused by opensim (it probably should) but it's used by | 2085 | /// Note: this may not be used by opensim (it probably should) but it's used by |
2068 | /// external modules. | 2086 | /// external modules. |
2069 | /// </summary> | 2087 | /// </summary> |
2070 | public void SendGroupRootTerseUpdate() | 2088 | public void SendGroupRootTerseUpdate() |
@@ -2079,6 +2097,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2079 | { | 2097 | { |
2080 | if (m_scene == null) // Need to check here as it's null during object creation | 2098 | if (m_scene == null) // Need to check here as it's null during object creation |
2081 | return; | 2099 | return; |
2100 | |||
2082 | m_scene.SceneGraph.AddToUpdateList(this); | 2101 | m_scene.SceneGraph.AddToUpdateList(this); |
2083 | } | 2102 | } |
2084 | 2103 | ||
@@ -3557,7 +3576,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
3557 | HasGroupChanged = true; | 3576 | HasGroupChanged = true; |
3558 | } | 3577 | } |
3559 | 3578 | ||
3560 | ScheduleGroupForFullUpdate(); | 3579 | // Don't trigger the update here - otherwise some client issues occur when multiple updates are scheduled |
3580 | // for the same object with very different properties. The caller must schedule the update. | ||
3581 | //ScheduleGroupForFullUpdate(); | ||
3561 | } | 3582 | } |
3562 | 3583 | ||
3563 | public void TriggerScriptChangedEvent(Changed val) | 3584 | public void TriggerScriptChangedEvent(Changed val) |
diff --git a/bin/OpenSim.exe.config b/bin/OpenSim.exe.config index 3c7adf5..4e7ef51 100755 --- a/bin/OpenSim.exe.config +++ b/bin/OpenSim.exe.config | |||
@@ -12,7 +12,7 @@ | |||
12 | <log4net> | 12 | <log4net> |
13 | <appender name="Console" type="OpenSim.Framework.Console.OpenSimAppender, OpenSim.Framework.Console"> | 13 | <appender name="Console" type="OpenSim.Framework.Console.OpenSimAppender, OpenSim.Framework.Console"> |
14 | <layout type="log4net.Layout.PatternLayout"> | 14 | <layout type="log4net.Layout.PatternLayout"> |
15 | <conversionPattern value="%date{HH:mm:ss} - %message" /> | 15 | <conversionPattern value="%date{HH:mm:ss,fff} - %message" /> |
16 | </layout> | 16 | </layout> |
17 | </appender> | 17 | </appender> |
18 | 18 | ||