diff options
author | Melanie Thielker | 2010-07-21 12:31:59 +0200 |
---|---|---|
committer | Melanie | 2010-07-21 19:25:40 +0100 |
commit | 316854dc137709d4aeb0bf20351de1c75af20fe5 (patch) | |
tree | 3edd3c4016228ecffb9034e0f5eeccd2195d3483 /OpenSim/Region/Framework/Scenes | |
parent | Merge branch '0.6.9-post-fixes' into careminster (diff) | |
download | opensim-SC-316854dc137709d4aeb0bf20351de1c75af20fe5.zip opensim-SC-316854dc137709d4aeb0bf20351de1c75af20fe5.tar.gz opensim-SC-316854dc137709d4aeb0bf20351de1c75af20fe5.tar.bz2 opensim-SC-316854dc137709d4aeb0bf20351de1c75af20fe5.tar.xz |
Allow megaregions to be used in M7, should we so decide
Diffstat (limited to 'OpenSim/Region/Framework/Scenes')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.cs | 2 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneGraph.cs | 47 |
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(); |