aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorMelanie2012-02-14 00:02:53 +0100
committerMelanie2012-02-14 00:02:53 +0100
commite3213065173e1408a138eb0bce0c9e936073b19b (patch)
tree9f16fe341720f5131cc3060e156c9d534be01e02 /OpenSim
parentMerge branch 'master' into careminster (diff)
downloadopensim-SC-e3213065173e1408a138eb0bce0c9e936073b19b.zip
opensim-SC-e3213065173e1408a138eb0bce0c9e936073b19b.tar.gz
opensim-SC-e3213065173e1408a138eb0bce0c9e936073b19b.tar.bz2
opensim-SC-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
-rw-r--r--OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs5
4 files changed, 22 insertions, 9 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 {
diff --git a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs
index 24a23dd..8ab3b64 100644
--- a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs
+++ b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs
@@ -433,11 +433,14 @@ namespace OpenSim.Services.Connectors.Simulation
433 args["destination_name"] = OSD.FromString(destination.RegionName); 433 args["destination_name"] = OSD.FromString(destination.RegionName);
434 args["destination_uuid"] = OSD.FromString(destination.RegionID.ToString()); 434 args["destination_uuid"] = OSD.FromString(destination.RegionID.ToString());
435 435
436 WebUtil.PostToService(uri, args, 40000); 436 OSDMap response = WebUtil.PostToService(uri, args, 40000);
437 if (response["Success"] == "False")
438 return false;
437 } 439 }
438 catch (Exception e) 440 catch (Exception e)
439 { 441 {
440 m_log.WarnFormat("[REMOTE SIMULATION CONNECTOR] CreateObject failed with exception; {0}",e.ToString()); 442 m_log.WarnFormat("[REMOTE SIMULATION CONNECTOR] CreateObject failed with exception; {0}",e.ToString());
443 return false;
441 } 444 }
442 445
443 return true; 446 return true;