aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorTeravus Ovares2009-04-09 21:48:11 +0000
committerTeravus Ovares2009-04-09 21:48:11 +0000
commit4050dec682e44a27451b708bcd07bade764f9aee (patch)
treebdabbc90403eaa91d645beb8e52b2c5c32e6cce1 /OpenSim
parent* Reinstated Scene Crossing tests, now with timeouts to check for race condit... (diff)
downloadopensim-SC_OLD-4050dec682e44a27451b708bcd07bade764f9aee.zip
opensim-SC_OLD-4050dec682e44a27451b708bcd07bade764f9aee.tar.gz
opensim-SC_OLD-4050dec682e44a27451b708bcd07bade764f9aee.tar.bz2
opensim-SC_OLD-4050dec682e44a27451b708bcd07bade764f9aee.tar.xz
* Changes the timstep of the bullet world
* Enables border crossings when using the BulletDotNETPlugin * Enabled variable time steps in BulletDotNETPlugin * Still no 'linked physical objects' yet * Still no script engine integration
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/Physics/BulletDotNETPlugin/BulletDotNETCharacter.cs8
-rw-r--r--OpenSim/Region/Physics/BulletDotNETPlugin/BulletDotNETScene.cs15
2 files changed, 12 insertions, 11 deletions
diff --git a/OpenSim/Region/Physics/BulletDotNETPlugin/BulletDotNETCharacter.cs b/OpenSim/Region/Physics/BulletDotNETPlugin/BulletDotNETCharacter.cs
index 03646e5..c584cd6 100644
--- a/OpenSim/Region/Physics/BulletDotNETPlugin/BulletDotNETCharacter.cs
+++ b/OpenSim/Region/Physics/BulletDotNETPlugin/BulletDotNETCharacter.cs
@@ -1019,10 +1019,10 @@ namespace OpenSim.Region.Physics.BulletDotNETPlugin
1019 PhysicsVector vec = new PhysicsVector(tempVector1.getX(),tempVector1.getY(),tempVector1.getZ()); 1019 PhysicsVector vec = new PhysicsVector(tempVector1.getX(),tempVector1.getY(),tempVector1.getZ());
1020 1020
1021 // kluge to keep things in bounds. ODE lets dead avatars drift away (they should be removed!) 1021 // kluge to keep things in bounds. ODE lets dead avatars drift away (they should be removed!)
1022 if (vec.X < 0.0f) vec.X = 0.0f; 1022 if (vec.X < -10.0f) vec.X = 0.0f;
1023 if (vec.Y < 0.0f) vec.Y = 0.0f; 1023 if (vec.Y < -10.0f) vec.Y = 0.0f;
1024 if (vec.X > (int)Constants.RegionSize - 0.2f) vec.X = (int)Constants.RegionSize - 0.2f; 1024 if (vec.X > (int)Constants.RegionSize + 10.2f) vec.X = (int)Constants.RegionSize + 10.2f;
1025 if (vec.Y > (int)Constants.RegionSize - 0.2f) vec.Y = (int)Constants.RegionSize - 0.2f; 1025 if (vec.Y > (int)Constants.RegionSize + 10.2f) vec.Y = (int)Constants.RegionSize + 10.2f;
1026 1026
1027 m_position.X = vec.X; 1027 m_position.X = vec.X;
1028 m_position.Y = vec.Y; 1028 m_position.Y = vec.Y;
diff --git a/OpenSim/Region/Physics/BulletDotNETPlugin/BulletDotNETScene.cs b/OpenSim/Region/Physics/BulletDotNETPlugin/BulletDotNETScene.cs
index 49a16a0..5c2db53 100644
--- a/OpenSim/Region/Physics/BulletDotNETPlugin/BulletDotNETScene.cs
+++ b/OpenSim/Region/Physics/BulletDotNETPlugin/BulletDotNETScene.cs
@@ -73,8 +73,8 @@ namespace OpenSim.Region.Physics.BulletDotNETPlugin
73 private float avStandupTensor = 2000000f; 73 private float avStandupTensor = 2000000f;
74 private float avDensity = 80f; 74 private float avDensity = 80f;
75 private float avHeightFudgeFactor = 0.52f; 75 private float avHeightFudgeFactor = 0.52f;
76 private float avMovementDivisorWalk = 1.0f; 76 private float avMovementDivisorWalk = 1.8f;
77 private float avMovementDivisorRun = 0.75f; 77 private float avMovementDivisorRun = 0.8f;
78 78
79 private float minimumGroundFlightOffset = 3f; 79 private float minimumGroundFlightOffset = 3f;
80 80
@@ -99,8 +99,8 @@ namespace OpenSim.Region.Physics.BulletDotNETPlugin
99 private bool usingGImpactAlgorithm = false; 99 private bool usingGImpactAlgorithm = false;
100 100
101 private IConfigSource m_config; 101 private IConfigSource m_config;
102 private readonly btVector3 worldAabbMin = new btVector3(0, 0, 0); 102 private readonly btVector3 worldAabbMin = new btVector3(-10f, -10f, 0);
103 private readonly btVector3 worldAabbMax = new btVector3(Constants.RegionSize, Constants.RegionSize , 9000); 103 private readonly btVector3 worldAabbMax = new btVector3((int)Constants.RegionSize + 10f, (int)Constants.RegionSize + 10f, 9000);
104 104
105 public IMesher mesher; 105 public IMesher mesher;
106 106
@@ -245,6 +245,7 @@ namespace OpenSim.Region.Physics.BulletDotNETPlugin
245 245
246 public override float Simulate(float timeStep) 246 public override float Simulate(float timeStep)
247 { 247 {
248
248 lock (m_taintedActors) 249 lock (m_taintedActors)
249 { 250 {
250 foreach (PhysicsActor act in m_taintedActors) 251 foreach (PhysicsActor act in m_taintedActors)
@@ -273,7 +274,7 @@ namespace OpenSim.Region.Physics.BulletDotNETPlugin
273 prim.Move(timeStep); 274 prim.Move(timeStep);
274 } 275 }
275 } 276 }
276 float steps = m_world.stepSimulation(WorldTimeStep, 5, WorldTimeComp); 277 float steps = m_world.stepSimulation(timeStep * 10, 10, WorldTimeComp);
277 278
278 foreach (BulletDotNETCharacter chr in m_characters) 279 foreach (BulletDotNETCharacter chr in m_characters)
279 { 280 {
@@ -513,8 +514,8 @@ namespace OpenSim.Region.Physics.BulletDotNETPlugin
513 // Is there any reason that we don't do this in ScenePresence? 514 // Is there any reason that we don't do this in ScenePresence?
514 // The only physics engine that benefits from it in the physics plugin is this one 515 // The only physics engine that benefits from it in the physics plugin is this one
515 516
516 if ((int)x > Constants.RegionSize || (int)y > Constants.RegionSize || 517 if (x > (int)Constants.RegionSize || y > (int)Constants.RegionSize ||
517 (int)x < 0.001f || (int)y < 0.001f) 518 x < 0.001f || y < 0.001f)
518 return 0; 519 return 0;
519 520
520 return _origheightmap[(int)y * Constants.RegionSize + (int)x]; 521 return _origheightmap[(int)y * Constants.RegionSize + (int)x];