aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorMelanie Thielker2010-07-21 12:31:59 +0200
committerMelanie Thielker2010-07-21 12:32:23 +0200
commitfb89d0ff4eb4636a6a70fd45c85b935e0a6b388a (patch)
tree4e716d31b6b5867750abceb1a85aa3261c684eeb /OpenSim
parentMerge branch 'careminster-presence-refactor' of ssh://3dhosting.de/var/git/ca... (diff)
downloadopensim-SC_OLD-fb89d0ff4eb4636a6a70fd45c85b935e0a6b388a.zip
opensim-SC_OLD-fb89d0ff4eb4636a6a70fd45c85b935e0a6b388a.tar.gz
opensim-SC_OLD-fb89d0ff4eb4636a6a70fd45c85b935e0a6b388a.tar.bz2
opensim-SC_OLD-fb89d0ff4eb4636a6a70fd45c85b935e0a6b388a.tar.xz
Allow megaregions to be used in M7, should we so decide
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs2
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneGraph.cs47
2 files changed, 27 insertions, 22 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index f79bd23..2a498cc 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -137,6 +137,7 @@ namespace OpenSim.Region.Framework.Scenes
137 protected SceneCommunicationService m_sceneGridService; 137 protected SceneCommunicationService m_sceneGridService;
138 public bool LoginsDisabled = true; 138 public bool LoginsDisabled = true;
139 public bool LoadingPrims = false; 139 public bool LoadingPrims = false;
140 public bool CombineRegions = false;
140 141
141 public new float TimeDilation 142 public new float TimeDilation
142 { 143 {
@@ -768,6 +769,7 @@ namespace OpenSim.Region.Framework.Scenes
768 } 769 }
769 770
770 m_strictAccessControl = startupConfig.GetBoolean("StrictAccessControl", m_strictAccessControl); 771 m_strictAccessControl = startupConfig.GetBoolean("StrictAccessControl", m_strictAccessControl);
772 CombineRegions = startupConfig.GetBoolean("CombineContiguousRegions", false);
771 773
772 #region BinaryStats 774 #region BinaryStats
773 775
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
index a36800b..12c1c20 100644
--- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
@@ -283,30 +283,33 @@ namespace OpenSim.Region.Framework.Scenes
283 protected internal bool AddRestoredSceneObject( 283 protected internal bool AddRestoredSceneObject(
284 SceneObjectGroup sceneObject, bool attachToBackup, bool alreadyPersisted, bool sendClientUpdates) 284 SceneObjectGroup sceneObject, bool attachToBackup, bool alreadyPersisted, bool sendClientUpdates)
285 { 285 {
286 // KF: Check for out-of-region, move inside and make static. 286 if (!m_parentScene.CombineRegions)
287 Vector3 npos = new Vector3(sceneObject.RootPart.GroupPosition.X, 287 {
288 sceneObject.RootPart.GroupPosition.Y, 288 // KF: Check for out-of-region, move inside and make static.
289 sceneObject.RootPart.GroupPosition.Z); 289 Vector3 npos = new Vector3(sceneObject.RootPart.GroupPosition.X,
290 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 || 290 sceneObject.RootPart.GroupPosition.Y,
291 npos.X > Constants.RegionSize || 291 sceneObject.RootPart.GroupPosition.Z);
292 npos.Y > Constants.RegionSize)) 292 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 ||
293 { 293 npos.X > Constants.RegionSize ||
294 if (npos.X < 0.0) npos.X = 1.0f; 294 npos.Y > Constants.RegionSize))
295 if (npos.Y < 0.0) npos.Y = 1.0f;
296 if (npos.Z < 0.0) npos.Z = 0.0f;
297 if (npos.X > Constants.RegionSize) npos.X = Constants.RegionSize - 1.0f;
298 if (npos.Y > Constants.RegionSize) npos.Y = Constants.RegionSize - 1.0f;
299
300 foreach (SceneObjectPart part in sceneObject.Children.Values)
301 { 295 {
302 part.GroupPosition = npos; 296 if (npos.X < 0.0) npos.X = 1.0f;
297 if (npos.Y < 0.0) npos.Y = 1.0f;
298 if (npos.Z < 0.0) npos.Z = 0.0f;
299 if (npos.X > Constants.RegionSize) npos.X = Constants.RegionSize - 1.0f;
300 if (npos.Y > Constants.RegionSize) npos.Y = Constants.RegionSize - 1.0f;
301
302 foreach (SceneObjectPart part in sceneObject.Children.Values)
303 {
304 part.GroupPosition = npos;
305 }
306 sceneObject.RootPart.Velocity = Vector3.Zero;
307 sceneObject.RootPart.AngularVelocity = Vector3.Zero;
308 sceneObject.RootPart.Acceleration = Vector3.Zero;
309 sceneObject.RootPart.Velocity = Vector3.Zero;
303 } 310 }
304 sceneObject.RootPart.Velocity = Vector3.Zero; 311 }
305 sceneObject.RootPart.AngularVelocity = Vector3.Zero; 312
306 sceneObject.RootPart.Acceleration = Vector3.Zero;
307 sceneObject.RootPart.Velocity = Vector3.Zero;
308 }
309
310 if (!alreadyPersisted) 313 if (!alreadyPersisted)
311 { 314 {
312 sceneObject.ForceInventoryPersistence(); 315 sceneObject.ForceInventoryPersistence();