aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2011-09-05 23:42:37 +0100
committerJustin Clark-Casey (justincc)2011-09-05 23:42:37 +0100
commitcf73afec356eed30e169be3ce71edad89b4fdb37 (patch)
tree8e1e05ce4e4c3697de637213c45e700a2afe69f9
parentAllow the HGInventoryBroker to set the UserManager when it instantiates a Rem... (diff)
downloadopensim-SC_OLD-cf73afec356eed30e169be3ce71edad89b4fdb37.zip
opensim-SC_OLD-cf73afec356eed30e169be3ce71edad89b4fdb37.tar.gz
opensim-SC_OLD-cf73afec356eed30e169be3ce71edad89b4fdb37.tar.bz2
opensim-SC_OLD-cf73afec356eed30e169be3ce71edad89b4fdb37.tar.xz
Try disabling the inconsistent attachment state check to see if this actually has an impact.
The code in question is over three years old and just be catching an inconsistency rather than being wholly necessary. This commit still carries out the check and prints all the previous log warnings but a 'failure' no longer prevents avatar region crossing or teleport, and it doesn't give the client the error message. This will have some kind of impact on http://opensimulator.org/mantis/view.php?id=5672
-rw-r--r--OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs31
-rw-r--r--OpenSim/Region/CoreModules/Scripting/WorldComm/WorldCommModule.cs3
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs16
3 files changed, 27 insertions, 23 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
index 45506ed..ac13d5e 100644
--- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
@@ -209,7 +209,10 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
209 sp.Teleport(position); 209 sp.Teleport(position);
210 210
211 foreach (SceneObjectGroup grp in sp.GetAttachments()) 211 foreach (SceneObjectGroup grp in sp.GetAttachments())
212 sp.Scene.EventManager.TriggerOnScriptChangedEvent(grp.LocalId, (uint)Changed.TELEPORT); 212 {
213 if (grp.IsDeleted)
214 sp.Scene.EventManager.TriggerOnScriptChangedEvent(grp.LocalId, (uint)Changed.TELEPORT);
215 }
213 } 216 }
214 else // Another region possibly in another simulator 217 else // Another region possibly in another simulator
215 { 218 {
@@ -326,11 +329,11 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
326 if (sp.ParentID != (uint)0) 329 if (sp.ParentID != (uint)0)
327 sp.StandUp(); 330 sp.StandUp();
328 331
329 if (!sp.ValidateAttachments()) 332// if (!sp.ValidateAttachments())
330 { 333// {
331 sp.ControllingClient.SendTeleportFailed("Inconsistent attachment state"); 334// sp.ControllingClient.SendTeleportFailed("Inconsistent attachment state");
332 return; 335// return;
333 } 336// }
334 337
335 string reason; 338 string reason;
336 string version; 339 string version;
@@ -944,8 +947,10 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
944 947
945 Scene m_scene = agent.Scene; 948 Scene m_scene = agent.Scene;
946 949
947 if (neighbourRegion != null && agent.ValidateAttachments()) 950 if (neighbourRegion != null)
948 { 951 {
952 agent.ValidateAttachments();
953
949 pos = pos + (agent.Velocity); 954 pos = pos + (agent.Velocity);
950 955
951 SetInTransit(agent.UUID); 956 SetInTransit(agent.UUID);
@@ -1763,16 +1768,16 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1763 List<SceneObjectGroup> m_attachments = sp.GetAttachments(); 1768 List<SceneObjectGroup> m_attachments = sp.GetAttachments();
1764 1769
1765 // Validate 1770 // Validate
1766 foreach (SceneObjectGroup gobj in m_attachments) 1771// foreach (SceneObjectGroup gobj in m_attachments)
1767 { 1772// {
1768 if (gobj == null || gobj.IsDeleted) 1773// if (gobj == null || gobj.IsDeleted)
1769 return false; 1774// return false;
1770 } 1775// }
1771 1776
1772 foreach (SceneObjectGroup gobj in m_attachments) 1777 foreach (SceneObjectGroup gobj in m_attachments)
1773 { 1778 {
1774 // If the prim group is null then something must have happened to it! 1779 // If the prim group is null then something must have happened to it!
1775 if (gobj != null) 1780 if (gobj != null && !gobj.IsDeleted)
1776 { 1781 {
1777 // Set the parent localID to 0 so it transfers over properly. 1782 // Set the parent localID to 0 so it transfers over properly.
1778 gobj.RootPart.SetParentLocalId(0); 1783 gobj.RootPart.SetParentLocalId(0);
diff --git a/OpenSim/Region/CoreModules/Scripting/WorldComm/WorldCommModule.cs b/OpenSim/Region/CoreModules/Scripting/WorldComm/WorldCommModule.cs
index b20a875..a14a84b 100644
--- a/OpenSim/Region/CoreModules/Scripting/WorldComm/WorldCommModule.cs
+++ b/OpenSim/Region/CoreModules/Scripting/WorldComm/WorldCommModule.cs
@@ -323,7 +323,8 @@ namespace OpenSim.Region.CoreModules.Scripting.WorldComm
323 List<UUID> targets = new List<UUID>(); 323 List<UUID> targets = new List<UUID>();
324 foreach (SceneObjectGroup sog in attachments) 324 foreach (SceneObjectGroup sog in attachments)
325 { 325 {
326 targets.Add(sog.UUID); 326 if (!sog.IsDeleted)
327 targets.Add(sog.UUID);
327 } 328 }
328 329
329 // Need to check each attachment 330 // Need to check each attachment
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 1c283c7..f231a39 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -3498,7 +3498,10 @@ namespace OpenSim.Region.Framework.Scenes
3498 m_attachments.Clear(); 3498 m_attachments.Clear();
3499 } 3499 }
3500 3500
3501 public bool ValidateAttachments() 3501 /// <summary>
3502 /// This is currently just being done for information.
3503 /// </summary>
3504 public void ValidateAttachments()
3502 { 3505 {
3503 lock (m_attachments) 3506 lock (m_attachments)
3504 { 3507 {
@@ -3508,21 +3511,16 @@ namespace OpenSim.Region.Framework.Scenes
3508 if (gobj == null) 3511 if (gobj == null)
3509 { 3512 {
3510 m_log.WarnFormat( 3513 m_log.WarnFormat(
3511 "[SCENE PRESENCE]: Failed to validate an attachment for {0} since it was null", Name); 3514 "[SCENE PRESENCE]: Failed to validate an attachment for {0} since it was null. Continuing", Name);
3512 return false;
3513 } 3515 }
3514 3516 else if (gobj.IsDeleted)
3515 if (gobj.IsDeleted)
3516 { 3517 {
3517 m_log.WarnFormat( 3518 m_log.WarnFormat(
3518 "[SCENE PRESENCE]: Failed to validate attachment {0} {1} for {2} since it had been deleted", 3519 "[SCENE PRESENCE]: Failed to validate attachment {0} {1} for {2} since it had been deleted. Continuing",
3519 gobj.Name, gobj.UUID, Name); 3520 gobj.Name, gobj.UUID, Name);
3520 return false;
3521 } 3521 }
3522 } 3522 }
3523 } 3523 }
3524
3525 return true;
3526 } 3524 }
3527 3525
3528 /// <summary> 3526 /// <summary>