diff options
author | Melanie | 2011-12-24 01:43:44 +0100 |
---|---|---|
committer | Melanie | 2011-12-24 01:43:44 +0100 |
commit | c9dbcfbb3105179167a7f73eff25910538228d0c (patch) | |
tree | c9aba0c9ef03885c314ab0fedb5027b782cd02d3 /OpenSim/Region/CoreModules | |
parent | Add setter for Acceleration on physics objects. (diff) | |
parent | Merge branch 'master' into careminster (diff) | |
download | opensim-SC_OLD-c9dbcfbb3105179167a7f73eff25910538228d0c.zip opensim-SC_OLD-c9dbcfbb3105179167a7f73eff25910538228d0c.tar.gz opensim-SC_OLD-c9dbcfbb3105179167a7f73eff25910538228d0c.tar.bz2 opensim-SC_OLD-c9dbcfbb3105179167a7f73eff25910538228d0c.tar.xz |
Merge branch 'master' of ssh://3dhosting.de/var/git/careminster
Diffstat (limited to 'OpenSim/Region/CoreModules')
-rw-r--r-- | OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs | 24 |
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; |