diff options
author | Diva Canto | 2011-12-23 10:58:55 -0800 |
---|---|---|
committer | Diva Canto | 2011-12-23 10:58:55 -0800 |
commit | d38b8caf2bdd7a2850cacc60d783493f56592ec3 (patch) | |
tree | 83fb0496fd46501bc80cb4e10505d5db921bf4dd /OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs | |
parent | HG: AAdded a few missing /'s at the end of URLs (diff) | |
parent | remove the old region crossing handler (diff) | |
download | opensim-SC_OLD-d38b8caf2bdd7a2850cacc60d783493f56592ec3.zip opensim-SC_OLD-d38b8caf2bdd7a2850cacc60d783493f56592ec3.tar.gz opensim-SC_OLD-d38b8caf2bdd7a2850cacc60d783493f56592ec3.tar.bz2 opensim-SC_OLD-d38b8caf2bdd7a2850cacc60d783493f56592ec3.tar.xz |
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs | 16 |
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 | } |