aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorMelanie2012-02-14 00:02:53 +0100
committerMelanie2012-02-14 00:02:53 +0100
commite3213065173e1408a138eb0bce0c9e936073b19b (patch)
tree9f16fe341720f5131cc3060e156c9d534be01e02 /OpenSim/Region
parentMerge branch 'master' into careminster (diff)
downloadopensim-SC_OLD-e3213065173e1408a138eb0bce0c9e936073b19b.zip
opensim-SC_OLD-e3213065173e1408a138eb0bce0c9e936073b19b.tar.gz
opensim-SC_OLD-e3213065173e1408a138eb0bce0c9e936073b19b.tar.bz2
opensim-SC_OLD-e3213065173e1408a138eb0bce0c9e936073b19b.tar.xz
Prevent object loss and positioning outside the region with failed object sim
crossings
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs10
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs4
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs12
3 files changed, 18 insertions, 8 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
index f1399af..4b1c0bc 100644
--- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
@@ -1731,17 +1731,17 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1731 { 1731 {
1732 m_log.InfoFormat("[ENTITY TRANSFER MODULE] cross region transfer failed for object {0}",grp.UUID); 1732 m_log.InfoFormat("[ENTITY TRANSFER MODULE] cross region transfer failed for object {0}",grp.UUID);
1733 1733
1734 // Need to turn off the physics flags, otherwise the object will continue to attempt to
1735 // move out of the region creating an infinite loop of failed attempts to cross
1736 grp.UpdatePrimFlags(grp.RootPart.LocalId,false,grp.IsTemporary,grp.IsPhantom,false);
1737
1734 // We are going to move the object back to the old position so long as the old position 1738 // We are going to move the object back to the old position so long as the old position
1735 // is in the region 1739 // is in the region
1736 oldGroupPosition.X = Util.Clamp<float>(oldGroupPosition.X,1.0f,(float)Constants.RegionSize-1); 1740 oldGroupPosition.X = Util.Clamp<float>(oldGroupPosition.X,1.0f,(float)Constants.RegionSize-1);
1737 oldGroupPosition.Y = Util.Clamp<float>(oldGroupPosition.Y,1.0f,(float)Constants.RegionSize-1); 1741 oldGroupPosition.Y = Util.Clamp<float>(oldGroupPosition.Y,1.0f,(float)Constants.RegionSize-1);
1738 oldGroupPosition.Z = Util.Clamp<float>(oldGroupPosition.Z,1.0f,4096.0f); 1742 oldGroupPosition.Z = Util.Clamp<float>(oldGroupPosition.Z,1.0f,4096.0f);
1739 1743
1740 grp.RootPart.GroupPosition = oldGroupPosition; 1744 grp.AbsolutePosition = oldGroupPosition;
1741
1742 // Need to turn off the physics flags, otherwise the object will continue to attempt to
1743 // move out of the region creating an infinite loop of failed attempts to cross
1744 grp.UpdatePrimFlags(grp.RootPart.LocalId,false,grp.IsTemporary,grp.IsPhantom,false);
1745 1745
1746 grp.ScheduleGroupForFullUpdate(); 1746 grp.ScheduleGroupForFullUpdate();
1747 } 1747 }
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
index 683aafc..877fe96 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
@@ -466,6 +466,10 @@ namespace OpenSim.Region.Framework.Scenes
466 && !IsAttachmentCheckFull() && (!Scene.LoadingPrims)) 466 && !IsAttachmentCheckFull() && (!Scene.LoadingPrims))
467 { 467 {
468 m_scene.CrossPrimGroupIntoNewRegion(val, this, true); 468 m_scene.CrossPrimGroupIntoNewRegion(val, this, true);
469
470 if (IsDeleted)
471 return;
472 val = AbsolutePosition;
469 } 473 }
470 } 474 }
471 475
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index b0b1b16..1529140 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -2188,7 +2188,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2188 if (part.ParentGroup.RootPart == part) 2188 if (part.ParentGroup.RootPart == part)
2189 { 2189 {
2190 SceneObjectGroup parent = part.ParentGroup; 2190 SceneObjectGroup parent = part.ParentGroup;
2191 parent.UpdateGroupPosition(new Vector3((float)toPos.x, (float)toPos.y, (float)toPos.z)); 2191 Util.FireAndForget(delegate(object x) {
2192 parent.UpdateGroupPosition(new Vector3((float)toPos.x, (float)toPos.y, (float)toPos.z));
2193 });
2192 } 2194 }
2193 else 2195 else
2194 { 2196 {
@@ -7973,7 +7975,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7973 if (part.ParentGroup.RootPart == part) 7975 if (part.ParentGroup.RootPart == part)
7974 { 7976 {
7975 SceneObjectGroup parent = part.ParentGroup; 7977 SceneObjectGroup parent = part.ParentGroup;
7976 parent.UpdateGroupPosition(new Vector3((float)currentPosition.x, (float)currentPosition.y, (float)currentPosition.z)); 7978 Util.FireAndForget(delegate(object x) {
7979 parent.UpdateGroupPosition(new Vector3((float)currentPosition.x, (float)currentPosition.y, (float)currentPosition.z));
7980 });
7977 } 7981 }
7978 else 7982 else
7979 { 7983 {
@@ -7990,7 +7994,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7990 if (part.ParentGroup.RootPart == part) 7994 if (part.ParentGroup.RootPart == part)
7991 { 7995 {
7992 SceneObjectGroup parent = part.ParentGroup; 7996 SceneObjectGroup parent = part.ParentGroup;
7993 parent.UpdateGroupPosition(new Vector3((float)currentPosition.x, (float)currentPosition.y, (float)currentPosition.z)); 7997 Util.FireAndForget(delegate(object x) {
7998 parent.UpdateGroupPosition(new Vector3((float)currentPosition.x, (float)currentPosition.y, (float)currentPosition.z));
7999 });
7994 } 8000 }
7995 else 8001 else
7996 { 8002 {