aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules
diff options
context:
space:
mode:
authorMelanie2012-02-23 01:49:14 +0000
committerMelanie2012-02-23 01:49:14 +0000
commitf1a76195ea58b8efb22f6f56980c1d7960e195b8 (patch)
tree972beaa1d2a234f7792d9beaedbdef58e963c690 /OpenSim/Region/CoreModules
parentAdd permission checks to scripted object movements, which didn't respect bans (diff)
parentMerge branch 'master' of melanie@opensimulator.org:/var/git/opensim (diff)
downloadopensim-SC_OLD-f1a76195ea58b8efb22f6f56980c1d7960e195b8.zip
opensim-SC_OLD-f1a76195ea58b8efb22f6f56980c1d7960e195b8.tar.gz
opensim-SC_OLD-f1a76195ea58b8efb22f6f56980c1d7960e195b8.tar.bz2
opensim-SC_OLD-f1a76195ea58b8efb22f6f56980c1d7960e195b8.tar.xz
Merge branch 'master' into careminster
Conflicts: OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
Diffstat (limited to 'OpenSim/Region/CoreModules')
-rw-r--r--OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs13
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs6
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs6
3 files changed, 11 insertions, 14 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
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs
index faa1def..6e75692 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs
@@ -328,7 +328,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
328 * Object-related communications 328 * Object-related communications
329 */ 329 */
330 330
331 public bool CreateObject(GridRegion destination, ISceneObject sog, bool isLocalCall) 331 public bool CreateObject(GridRegion destination, Vector3 newPosition, ISceneObject sog, bool isLocalCall)
332 { 332 {
333 if (destination == null) 333 if (destination == null)
334 return false; 334 return false;
@@ -343,12 +343,12 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
343 // We need to make a local copy of the object 343 // We need to make a local copy of the object
344 ISceneObject sogClone = sog.CloneForNewScene(); 344 ISceneObject sogClone = sog.CloneForNewScene();
345 sogClone.SetState(sog.GetStateSnapshot(), s); 345 sogClone.SetState(sog.GetStateSnapshot(), s);
346 return s.IncomingCreateObject(sogClone); 346 return s.IncomingCreateObject(newPosition, sogClone);
347 } 347 }
348 else 348 else
349 { 349 {
350 // Use the object as it came through the wire 350 // Use the object as it came through the wire
351 return s.IncomingCreateObject(sog); 351 return s.IncomingCreateObject(newPosition, sog);
352 } 352 }
353 } 353 }
354 } 354 }
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs
index 391b1a1..4b70692 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs
@@ -297,13 +297,13 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
297 * Object-related communications 297 * Object-related communications
298 */ 298 */
299 299
300 public bool CreateObject(GridRegion destination, ISceneObject sog, bool isLocalCall) 300 public bool CreateObject(GridRegion destination, Vector3 newPosition, ISceneObject sog, bool isLocalCall)
301 { 301 {
302 if (destination == null) 302 if (destination == null)
303 return false; 303 return false;
304 304
305 // Try local first 305 // Try local first
306 if (m_localBackend.CreateObject(destination, sog, isLocalCall)) 306 if (m_localBackend.CreateObject(destination, newPosition, sog, isLocalCall))
307 { 307 {
308 //m_log.Debug("[REST COMMS]: LocalBackEnd SendCreateObject succeeded"); 308 //m_log.Debug("[REST COMMS]: LocalBackEnd SendCreateObject succeeded");
309 return true; 309 return true;
@@ -311,7 +311,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
311 311
312 // else do the remote thing 312 // else do the remote thing
313 if (!m_localBackend.IsLocalRegion(destination.RegionHandle)) 313 if (!m_localBackend.IsLocalRegion(destination.RegionHandle))
314 return m_remoteConnector.CreateObject(destination, sog, isLocalCall); 314 return m_remoteConnector.CreateObject(destination, newPosition, sog, isLocalCall);
315 315
316 return false; 316 return false;
317 } 317 }