diff options
Merge branch 'master' into careminster
Conflicts:
OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
Diffstat (limited to 'OpenSim/Region/CoreModules/Framework')
-rw-r--r-- | OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs index 6286689..2498705 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs | |||
@@ -1660,19 +1660,16 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
1660 | } | 1660 | } |
1661 | 1661 | ||
1662 | // Offset the positions for the new region across the border | 1662 | // Offset the positions for the new region across the border |
1663 | // NOT here | 1663 | Vector3 oldGroupPosition = grp.RootPart.GroupPosition; |
1664 | 1664 | ||
1665 | // If we fail to cross the border, then reset the position of the scene object on that border. | 1665 | // If we fail to cross the border, then reset the position of the scene object on that border. |
1666 | uint x = 0, y = 0; | 1666 | uint x = 0, y = 0; |
1667 | Utils.LongToUInts(newRegionHandle, out x, out y); | 1667 | Utils.LongToUInts(newRegionHandle, out x, out y); |
1668 | GridRegion destination = scene.GridService.GetRegionByPosition(scene.RegionInfo.ScopeID, (int)x, (int)y); | 1668 | GridRegion destination = scene.GridService.GetRegionByPosition(scene.RegionInfo.ScopeID, (int)x, (int)y); |
1669 | 1669 | ||
1670 | Vector3 oldGroupPosition = grp.RootPart.GroupPosition; | ||
1671 | |||
1672 | if (destination != null) | 1670 | if (destination != null) |
1673 | { | 1671 | { |
1674 | grp.RootPart.GroupPosition = pos; // only change this if we think there is anywhere to go | 1672 | if (CrossPrimGroupIntoNewRegion(destination, pos, grp, silent)) |
1675 | if (CrossPrimGroupIntoNewRegion(destination, grp, silent)) | ||
1676 | return; // we did it | 1673 | return; // we did it |
1677 | } | 1674 | } |
1678 | 1675 | ||
@@ -1701,7 +1698,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
1701 | /// true if the crossing itself was successful, false on failure | 1698 | /// true if the crossing itself was successful, false on failure |
1702 | /// FIMXE: we still return true if the crossing object was not successfully deleted from the originating region | 1699 | /// FIMXE: we still return true if the crossing object was not successfully deleted from the originating region |
1703 | /// </returns> | 1700 | /// </returns> |
1704 | protected bool CrossPrimGroupIntoNewRegion(GridRegion destination, SceneObjectGroup grp, bool silent) | 1701 | protected bool CrossPrimGroupIntoNewRegion(GridRegion destination, Vector3 newPosition, SceneObjectGroup grp, bool silent) |
1705 | { | 1702 | { |
1706 | //m_log.Debug(" >>> CrossPrimGroupIntoNewRegion <<<"); | 1703 | //m_log.Debug(" >>> CrossPrimGroupIntoNewRegion <<<"); |
1707 | 1704 | ||
@@ -1726,7 +1723,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
1726 | //if (m_interregionCommsOut != null) | 1723 | //if (m_interregionCommsOut != null) |
1727 | // successYN = m_interregionCommsOut.SendCreateObject(newRegionHandle, grp, true); | 1724 | // successYN = m_interregionCommsOut.SendCreateObject(newRegionHandle, grp, true); |
1728 | if (m_aScene.SimulationService != null) | 1725 | if (m_aScene.SimulationService != null) |
1729 | successYN = m_aScene.SimulationService.CreateObject(destination, grp, true); | 1726 | successYN = m_aScene.SimulationService.CreateObject(destination, newPosition, grp, true); |
1730 | 1727 | ||
1731 | if (successYN) | 1728 | if (successYN) |
1732 | { | 1729 | { |
@@ -1785,7 +1782,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
1785 | gobj.IsAttachment = false; | 1782 | gobj.IsAttachment = false; |
1786 | //gobj.RootPart.LastOwnerID = gobj.GetFromAssetID(); | 1783 | //gobj.RootPart.LastOwnerID = gobj.GetFromAssetID(); |
1787 | m_log.DebugFormat("[ENTITY TRANSFER MODULE]: Sending attachment {0} to region {1}", gobj.UUID, destination.RegionName); | 1784 | m_log.DebugFormat("[ENTITY TRANSFER MODULE]: Sending attachment {0} to region {1}", gobj.UUID, destination.RegionName); |
1788 | CrossPrimGroupIntoNewRegion(destination, gobj, silent); | 1785 | CrossPrimGroupIntoNewRegion(destination, Vector3.Zero, gobj, silent); |
1789 | } | 1786 | } |
1790 | } | 1787 | } |
1791 | 1788 | ||