diff options
author | Justin Clark-Casey (justincc) | 2011-10-28 23:43:31 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2011-10-28 23:43:31 +0100 |
commit | c2da1c4580302a3f1a30b7ad2e70f590aff76167 (patch) | |
tree | 449cd3ab509bebfdbf02f42567686b223474ee3e | |
parent | Add missing doc to rotation/position methods in SOG (diff) | |
download | opensim-SC_OLD-c2da1c4580302a3f1a30b7ad2e70f590aff76167.zip opensim-SC_OLD-c2da1c4580302a3f1a30b7ad2e70f590aff76167.tar.gz opensim-SC_OLD-c2da1c4580302a3f1a30b7ad2e70f590aff76167.tar.bz2 opensim-SC_OLD-c2da1c4580302a3f1a30b7ad2e70f590aff76167.tar.xz |
set grp.RootPart.GroupPosition for code consistency (and readability) rather than calling SOP.OffsetForNewRegion
-rw-r--r-- | OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs | 4 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 5 |
2 files changed, 2 insertions, 7 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs index f4d2fda..7324b26 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs | |||
@@ -1686,7 +1686,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
1686 | 1686 | ||
1687 | // Offset the positions for the new region across the border | 1687 | // Offset the positions for the new region across the border |
1688 | Vector3 oldGroupPosition = grp.RootPart.GroupPosition; | 1688 | Vector3 oldGroupPosition = grp.RootPart.GroupPosition; |
1689 | grp.OffsetForNewRegion(pos); | 1689 | grp.RootPart.GroupPosition = pos; |
1690 | 1690 | ||
1691 | // If we fail to cross the border, then reset the position of the scene object on that border. | 1691 | // If we fail to cross the border, then reset the position of the scene object on that border. |
1692 | uint x = 0, y = 0; | 1692 | uint x = 0, y = 0; |
@@ -1694,7 +1694,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
1694 | GridRegion destination = scene.GridService.GetRegionByPosition(scene.RegionInfo.ScopeID, (int)x, (int)y); | 1694 | GridRegion destination = scene.GridService.GetRegionByPosition(scene.RegionInfo.ScopeID, (int)x, (int)y); |
1695 | if (destination != null && !CrossPrimGroupIntoNewRegion(destination, grp, silent)) | 1695 | if (destination != null && !CrossPrimGroupIntoNewRegion(destination, grp, silent)) |
1696 | { | 1696 | { |
1697 | grp.OffsetForNewRegion(oldGroupPosition); | 1697 | grp.RootPart.GroupPosition = oldGroupPosition; |
1698 | grp.ScheduleGroupForFullUpdate(); | 1698 | grp.ScheduleGroupForFullUpdate(); |
1699 | } | 1699 | } |
1700 | } | 1700 | } |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index f6d3293..64810d2 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | |||
@@ -2798,11 +2798,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
2798 | ScheduleGroupForTerseUpdate(); | 2798 | ScheduleGroupForTerseUpdate(); |
2799 | } | 2799 | } |
2800 | 2800 | ||
2801 | public void OffsetForNewRegion(Vector3 offset) | ||
2802 | { | ||
2803 | m_rootPart.GroupPosition = offset; | ||
2804 | } | ||
2805 | |||
2806 | #endregion | 2801 | #endregion |
2807 | 2802 | ||
2808 | #region Rotation | 2803 | #region Rotation |