aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework
diff options
context:
space:
mode:
authorTom Grimshaw2010-07-22 10:49:14 -0700
committerTom Grimshaw2010-07-22 10:49:14 -0700
commitbf374705c6714f3645fddab0e6dd05bf62720775 (patch)
treed637be82779749d82e4157a18b69eecf0e73c898 /OpenSim/Region/Framework
parentAdd config option securePermissionsLoading which will stop the region from lo... (diff)
parentAllow megaregions to be used in M7, should we so decide (diff)
downloadopensim-SC-bf374705c6714f3645fddab0e6dd05bf62720775.zip
opensim-SC-bf374705c6714f3645fddab0e6dd05bf62720775.tar.gz
opensim-SC-bf374705c6714f3645fddab0e6dd05bf62720775.tar.bz2
opensim-SC-bf374705c6714f3645fddab0e6dd05bf62720775.tar.xz
Merge branch 'master' of ssh://3dhosting.de/var/git/careminster
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs5
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneGraph.cs47
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs2
3 files changed, 31 insertions, 23 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 221eb47..8af7514 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -145,6 +145,8 @@ namespace OpenSim.Region.Framework.Scenes
145 145
146 protected SceneCommunicationService m_sceneGridService; 146 protected SceneCommunicationService m_sceneGridService;
147 public bool LoginsDisabled = true; 147 public bool LoginsDisabled = true;
148 public bool LoadingPrims = false;
149 public bool CombineRegions = false;
148 150
149 public new float TimeDilation 151 public new float TimeDilation
150 { 152 {
@@ -655,6 +657,7 @@ namespace OpenSim.Region.Framework.Scenes
655 } 657 }
656 658
657 m_strictAccessControl = startupConfig.GetBoolean("StrictAccessControl", m_strictAccessControl); 659 m_strictAccessControl = startupConfig.GetBoolean("StrictAccessControl", m_strictAccessControl);
660 CombineRegions = startupConfig.GetBoolean("CombineContiguousRegions", false);
658 661
659 IConfig interest_management_config = m_config.Configs["InterestManagement"]; 662 IConfig interest_management_config = m_config.Configs["InterestManagement"];
660 if (interest_management_config != null) 663 if (interest_management_config != null)
@@ -1691,6 +1694,7 @@ namespace OpenSim.Region.Framework.Scenes
1691 /// </summary> 1694 /// </summary>
1692 public virtual void LoadPrimsFromStorage(UUID regionID) 1695 public virtual void LoadPrimsFromStorage(UUID regionID)
1693 { 1696 {
1697 LoadingPrims = true;
1694 m_log.Info("[SCENE]: Loading objects from datastore"); 1698 m_log.Info("[SCENE]: Loading objects from datastore");
1695 1699
1696 List<SceneObjectGroup> PrimsFromDB = m_storageManager.DataStore.LoadObjects(regionID); 1700 List<SceneObjectGroup> PrimsFromDB = m_storageManager.DataStore.LoadObjects(regionID);
@@ -1714,6 +1718,7 @@ namespace OpenSim.Region.Framework.Scenes
1714 } 1718 }
1715 1719
1716 m_log.Info("[SCENE]: Loaded " + PrimsFromDB.Count.ToString() + " SceneObject(s)"); 1720 m_log.Info("[SCENE]: Loaded " + PrimsFromDB.Count.ToString() + " SceneObject(s)");
1721 LoadingPrims = false;
1717 } 1722 }
1718 1723
1719 1724
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
index 5a1922a..1d126b6 100644
--- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
@@ -226,30 +226,33 @@ namespace OpenSim.Region.Framework.Scenes
226 protected internal bool AddRestoredSceneObject( 226 protected internal bool AddRestoredSceneObject(
227 SceneObjectGroup sceneObject, bool attachToBackup, bool alreadyPersisted, bool sendClientUpdates) 227 SceneObjectGroup sceneObject, bool attachToBackup, bool alreadyPersisted, bool sendClientUpdates)
228 { 228 {
229 // KF: Check for out-of-region, move inside and make static. 229 if (!m_parentScene.CombineRegions)
230 Vector3 npos = new Vector3(sceneObject.RootPart.GroupPosition.X, 230 {
231 sceneObject.RootPart.GroupPosition.Y, 231 // KF: Check for out-of-region, move inside and make static.
232 sceneObject.RootPart.GroupPosition.Z); 232 Vector3 npos = new Vector3(sceneObject.RootPart.GroupPosition.X,
233 if (!(((sceneObject.RootPart.Shape.PCode == (byte)PCode.Prim) && (sceneObject.RootPart.Shape.State != 0))) && (npos.X < 0.0 || npos.Y < 0.0 || npos.Z < 0.0 || 233 sceneObject.RootPart.GroupPosition.Y,
234 npos.X > Constants.RegionSize || 234 sceneObject.RootPart.GroupPosition.Z);
235 npos.Y > Constants.RegionSize)) 235 if (!(((sceneObject.RootPart.Shape.PCode == (byte)PCode.Prim) && (sceneObject.RootPart.Shape.State != 0))) && (npos.X < 0.0 || npos.Y < 0.0 || npos.Z < 0.0 ||
236 { 236 npos.X > Constants.RegionSize ||
237 if (npos.X < 0.0) npos.X = 1.0f; 237 npos.Y > Constants.RegionSize))
238 if (npos.Y < 0.0) npos.Y = 1.0f;
239 if (npos.Z < 0.0) npos.Z = 0.0f;
240 if (npos.X > Constants.RegionSize) npos.X = Constants.RegionSize - 1.0f;
241 if (npos.Y > Constants.RegionSize) npos.Y = Constants.RegionSize - 1.0f;
242
243 foreach (SceneObjectPart part in sceneObject.Children.Values)
244 { 238 {
245 part.GroupPosition = npos; 239 if (npos.X < 0.0) npos.X = 1.0f;
240 if (npos.Y < 0.0) npos.Y = 1.0f;
241 if (npos.Z < 0.0) npos.Z = 0.0f;
242 if (npos.X > Constants.RegionSize) npos.X = Constants.RegionSize - 1.0f;
243 if (npos.Y > Constants.RegionSize) npos.Y = Constants.RegionSize - 1.0f;
244
245 foreach (SceneObjectPart part in sceneObject.Children.Values)
246 {
247 part.GroupPosition = npos;
248 }
249 sceneObject.RootPart.Velocity = Vector3.Zero;
250 sceneObject.RootPart.AngularVelocity = Vector3.Zero;
251 sceneObject.RootPart.Acceleration = Vector3.Zero;
252 sceneObject.RootPart.Velocity = Vector3.Zero;
246 } 253 }
247 sceneObject.RootPart.Velocity = Vector3.Zero; 254 }
248 sceneObject.RootPart.AngularVelocity = Vector3.Zero; 255
249 sceneObject.RootPart.Acceleration = Vector3.Zero;
250 sceneObject.RootPart.Velocity = Vector3.Zero;
251 }
252
253 if (!alreadyPersisted) 256 if (!alreadyPersisted)
254 { 257 {
255 sceneObject.ForceInventoryPersistence(); 258 sceneObject.ForceInventoryPersistence();
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
index 93f45e0..54b27b2 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
@@ -404,7 +404,7 @@ namespace OpenSim.Region.Framework.Scenes
404 404
405 if ((m_scene.TestBorderCross(val - Vector3.UnitX, Cardinals.E) || m_scene.TestBorderCross(val + Vector3.UnitX, Cardinals.W) 405 if ((m_scene.TestBorderCross(val - Vector3.UnitX, Cardinals.E) || m_scene.TestBorderCross(val + Vector3.UnitX, Cardinals.W)
406 || m_scene.TestBorderCross(val - Vector3.UnitY, Cardinals.N) || m_scene.TestBorderCross(val + Vector3.UnitY, Cardinals.S)) 406 || m_scene.TestBorderCross(val - Vector3.UnitY, Cardinals.N) || m_scene.TestBorderCross(val + Vector3.UnitY, Cardinals.S))
407 && !IsAttachmentCheckFull()) 407 && !IsAttachmentCheckFull() && (!m_scene.LoadingPrims))
408 { 408 {
409 m_scene.CrossPrimGroupIntoNewRegion(val, this, true); 409 m_scene.CrossPrimGroupIntoNewRegion(val, this, true);
410 } 410 }