aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to '')
-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 8e860fb..8af7514 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -146,6 +146,7 @@ namespace OpenSim.Region.Framework.Scenes
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; 148 public bool LoadingPrims = false;
149 public bool CombineRegions = false;
149 150
150 public new float TimeDilation 151 public new float TimeDilation
151 { 152 {
@@ -656,6 +657,7 @@ namespace OpenSim.Region.Framework.Scenes
656 } 657 }
657 658
658 m_strictAccessControl = startupConfig.GetBoolean("StrictAccessControl", m_strictAccessControl); 659 m_strictAccessControl = startupConfig.GetBoolean("StrictAccessControl", m_strictAccessControl);
660 CombineRegions = startupConfig.GetBoolean("CombineContiguousRegions", false);
659 661
660 IConfig interest_management_config = m_config.Configs["InterestManagement"]; 662 IConfig interest_management_config = m_config.Configs["InterestManagement"];
661 if (interest_management_config != null) 663 if (interest_management_config != null)
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();