aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/CoreModules')
-rw-r--r--OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs16
1 files changed, 15 insertions, 1 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
index b9d5d32..cbef6ce 100644
--- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
@@ -1705,9 +1705,23 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1705 uint x = 0, y = 0; 1705 uint x = 0, y = 0;
1706 Utils.LongToUInts(newRegionHandle, out x, out y); 1706 Utils.LongToUInts(newRegionHandle, out x, out y);
1707 GridRegion destination = scene.GridService.GetRegionByPosition(scene.RegionInfo.ScopeID, (int)x, (int)y); 1707 GridRegion destination = scene.GridService.GetRegionByPosition(scene.RegionInfo.ScopeID, (int)x, (int)y);
1708 if (destination != null && !CrossPrimGroupIntoNewRegion(destination, grp, silent)) 1708
1709 if (destination == null || !CrossPrimGroupIntoNewRegion(destination, grp, silent))
1709 { 1710 {
1711 m_log.InfoFormat("[ENTITY TRANSFER MODULE] cross region transfer failed for object {0}",grp.UUID);
1712
1713 // We are going to move the object back to the old position so long as the old position
1714 // is in the region
1715 oldGroupPosition.X = Util.Clamp<float>(oldGroupPosition.X,1.0f,(float)Constants.RegionSize-1);
1716 oldGroupPosition.Y = Util.Clamp<float>(oldGroupPosition.Y,1.0f,(float)Constants.RegionSize-1);
1717 oldGroupPosition.Z = Util.Clamp<float>(oldGroupPosition.Z,1.0f,4096.0f);
1718
1710 grp.RootPart.GroupPosition = oldGroupPosition; 1719 grp.RootPart.GroupPosition = oldGroupPosition;
1720
1721 // Need to turn off the physics flags, otherwise the object will continue to attempt to
1722 // move out of the region creating an infinite loop of failed attempts to cross
1723 grp.UpdatePrimFlags(grp.RootPart.LocalId,false,grp.IsTemporary,grp.IsPhantom,false);
1724
1711 grp.ScheduleGroupForFullUpdate(); 1725 grp.ScheduleGroupForFullUpdate();
1712 } 1726 }
1713 } 1727 }