aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/Framework
diff options
context:
space:
mode:
authorMelanie2011-12-23 01:00:34 +0000
committerMelanie2011-12-23 01:00:34 +0000
commitb8a914b15b57668c846ddda29686bbfffa9db1ee (patch)
treee4c776056947e410daa3d91d1a5e3c1dc3210a72 /OpenSim/Region/CoreModules/Framework
parentMerge branch 'master' into careminster (diff)
parentFixes some problems with objects that attempt to cross a region boundary (diff)
downloadopensim-SC_OLD-b8a914b15b57668c846ddda29686bbfffa9db1ee.zip
opensim-SC_OLD-b8a914b15b57668c846ddda29686bbfffa9db1ee.tar.gz
opensim-SC_OLD-b8a914b15b57668c846ddda29686bbfffa9db1ee.tar.bz2
opensim-SC_OLD-b8a914b15b57668c846ddda29686bbfffa9db1ee.tar.xz
Merge branch 'master' into careminster
Diffstat (limited to 'OpenSim/Region/CoreModules/Framework')
-rw-r--r--OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs24
1 files changed, 24 insertions, 0 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
index e5906f3..9f4b6b7 100644
--- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
@@ -1727,6 +1727,30 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1727 uint x = 0, y = 0; 1727 uint x = 0, y = 0;
1728 Utils.LongToUInts(newRegionHandle, out x, out y); 1728 Utils.LongToUInts(newRegionHandle, out x, out y);
1729 GridRegion destination = scene.GridService.GetRegionByPosition(scene.RegionInfo.ScopeID, (int)x, (int)y); 1729 GridRegion destination = scene.GridService.GetRegionByPosition(scene.RegionInfo.ScopeID, (int)x, (int)y);
1730
1731 if (destination == null || !CrossPrimGroupIntoNewRegion(destination, grp, silent))
1732 {
1733 m_log.InfoFormat("[ENTITY TRANSFER MODULE] cross region transfer failed for object {0}",grp.UUID);
1734
1735 // We are going to move the object back to the old position so long as the old position
1736 // is in the region
1737 oldGroupPosition.X = Util.Clamp<float>(oldGroupPosition.X,1.0f,(float)Constants.RegionSize-1);
1738 oldGroupPosition.Y = Util.Clamp<float>(oldGroupPosition.Y,1.0f,(float)Constants.RegionSize-1);
1739 oldGroupPosition.Z = Util.Clamp<float>(oldGroupPosition.Z,1.0f,4096.0f);
1740
1741 grp.RootPart.GroupPosition = oldGroupPosition;
1742
1743 // Need to turn off the physics flags, otherwise the object will continue to attempt to
1744 // move out of the region creating an infinite loop of failed attempts to cross
1745 grp.UpdatePrimFlags(grp.RootPart.LocalId,false,grp.IsTemporary,grp.IsPhantom,false);
1746
1747 grp.ScheduleGroupForFullUpdate();
1748 }
1749
1750
1751
1752
1753
1730 if (destination != null && !CrossPrimGroupIntoNewRegion(destination, grp, silent)) 1754 if (destination != null && !CrossPrimGroupIntoNewRegion(destination, grp, silent))
1731 { 1755 {
1732 grp.RootPart.GroupPosition = oldGroupPosition; 1756 grp.RootPart.GroupPosition = oldGroupPosition;