aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorMelanie2011-12-23 01:00:34 +0000
committerMelanie2011-12-23 01:00:34 +0000
commitb8a914b15b57668c846ddda29686bbfffa9db1ee (patch)
treee4c776056947e410daa3d91d1a5e3c1dc3210a72 /OpenSim/Region
parentMerge branch 'master' into careminster (diff)
parentFixes some problems with objects that attempt to cross a region boundary (diff)
downloadopensim-SC_OLD-b8a914b15b57668c846ddda29686bbfffa9db1ee.zip
opensim-SC_OLD-b8a914b15b57668c846ddda29686bbfffa9db1ee.tar.gz
opensim-SC_OLD-b8a914b15b57668c846ddda29686bbfffa9db1ee.tar.bz2
opensim-SC_OLD-b8a914b15b57668c846ddda29686bbfffa9db1ee.tar.xz
Merge branch 'master' into careminster
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs24
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs2
-rw-r--r--OpenSim/Region/Physics/OdePlugin/OdeScene.cs4
3 files changed, 27 insertions, 3 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;
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
index 7723eba..48a870e 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
@@ -273,7 +273,7 @@ namespace OpenSim.Region.Framework.Scenes
273 /// </remarks> 273 /// </remarks>
274 public bool UsesPhysics 274 public bool UsesPhysics
275 { 275 {
276 get { return (RootPart.Flags & PrimFlags.TemporaryOnRez) != 0; } 276 get { return (RootPart.Flags & PrimFlags.Physics) != 0; }
277 } 277 }
278 278
279 /// <summary> 279 /// <summary>
diff --git a/OpenSim/Region/Physics/OdePlugin/OdeScene.cs b/OpenSim/Region/Physics/OdePlugin/OdeScene.cs
index 04ba738..2194ff0 100644
--- a/OpenSim/Region/Physics/OdePlugin/OdeScene.cs
+++ b/OpenSim/Region/Physics/OdePlugin/OdeScene.cs
@@ -110,7 +110,7 @@ namespace OpenSim.Region.Physics.OdePlugin
110 private const uint m_regionWidth = Constants.RegionSize; 110 private const uint m_regionWidth = Constants.RegionSize;
111 private const uint m_regionHeight = Constants.RegionSize; 111 private const uint m_regionHeight = Constants.RegionSize;
112 112
113 private float ODE_STEPSIZE = 0.020f; 113 private float ODE_STEPSIZE = 0.0178f;
114 private float metersInSpace = 29.9f; 114 private float metersInSpace = 29.9f;
115 private float m_timeDilation = 1.0f; 115 private float m_timeDilation = 1.0f;
116 116
@@ -456,7 +456,7 @@ namespace OpenSim.Region.Physics.OdePlugin
456 mAvatarObjectContactFriction = physicsconfig.GetFloat("m_avatarobjectcontact_friction", 75f); 456 mAvatarObjectContactFriction = physicsconfig.GetFloat("m_avatarobjectcontact_friction", 75f);
457 mAvatarObjectContactBounce = physicsconfig.GetFloat("m_avatarobjectcontact_bounce", 0.1f); 457 mAvatarObjectContactBounce = physicsconfig.GetFloat("m_avatarobjectcontact_bounce", 0.1f);
458 458
459 ODE_STEPSIZE = physicsconfig.GetFloat("world_stepsize", 0.020f); 459 ODE_STEPSIZE = physicsconfig.GetFloat("world_stepsize", ODE_STEPSIZE);
460 m_physicsiterations = physicsconfig.GetInt("world_internal_steps_without_collisions", 10); 460 m_physicsiterations = physicsconfig.GetInt("world_internal_steps_without_collisions", 10);
461 461
462 avDensity = physicsconfig.GetFloat("av_density", 80f); 462 avDensity = physicsconfig.GetFloat("av_density", 80f);