aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Physics/BulletSPlugin/BSScene.cs')
-rw-r--r--OpenSim/Region/Physics/BulletSPlugin/BSScene.cs13
1 files changed, 11 insertions, 2 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs b/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs
index b3dfa41..fe014fc 100644
--- a/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs
@@ -208,8 +208,17 @@ public sealed class BSScene : PhysicsScene, IPhysicsParameters
208 Name = EngineType + "/" + RegionName; 208 Name = EngineType + "/" + RegionName;
209 } 209 }
210 210
211 // Old version of initialization that assumes legacy sized regions (256x256)
211 public override void Initialise(IMesher meshmerizer, IConfigSource config) 212 public override void Initialise(IMesher meshmerizer, IConfigSource config)
212 { 213 {
214 m_log.ErrorFormat("{0} WARNING WARNING WARNING! BulletSim initialized without region extent specification. Terrain will be messed up.");
215 Vector3 regionExtent = new Vector3( Constants.RegionSize, Constants.RegionSize, Constants.RegionSize);
216 Initialise(meshmerizer, config, regionExtent);
217
218 }
219
220 public override void Initialise(IMesher meshmerizer, IConfigSource config, Vector3 regionExtent)
221 {
213 mesher = meshmerizer; 222 mesher = meshmerizer;
214 _taintOperations = new List<TaintCallbackEntry>(); 223 _taintOperations = new List<TaintCallbackEntry>();
215 _postTaintOperations = new Dictionary<string, TaintCallbackEntry>(); 224 _postTaintOperations = new Dictionary<string, TaintCallbackEntry>();
@@ -250,13 +259,13 @@ public sealed class BSScene : PhysicsScene, IPhysicsParameters
250 // a child in a mega-region. 259 // a child in a mega-region.
251 // Bullet actually doesn't care about the extents of the simulated 260 // Bullet actually doesn't care about the extents of the simulated
252 // area. It tracks active objects no matter where they are. 261 // area. It tracks active objects no matter where they are.
253 Vector3 worldExtent = new Vector3(Constants.RegionSize, Constants.RegionSize, Constants.RegionHeight); 262 Vector3 worldExtent = regionExtent;
254 263
255 World = PE.Initialize(worldExtent, Params, m_maxCollisionsPerFrame, ref m_collisionArray, m_maxUpdatesPerFrame, ref m_updateArray); 264 World = PE.Initialize(worldExtent, Params, m_maxCollisionsPerFrame, ref m_collisionArray, m_maxUpdatesPerFrame, ref m_updateArray);
256 265
257 Constraints = new BSConstraintCollection(World); 266 Constraints = new BSConstraintCollection(World);
258 267
259 TerrainManager = new BSTerrainManager(this); 268 TerrainManager = new BSTerrainManager(this, worldExtent);
260 TerrainManager.CreateInitialGroundPlaneAndTerrain(); 269 TerrainManager.CreateInitialGroundPlaneAndTerrain();
261 270
262 // Put some informational messages into the log file. 271 // Put some informational messages into the log file.