aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorDiva Canto2013-07-17 11:19:56 -0700
committerDiva Canto2013-07-17 11:19:56 -0700
commit2b8de2c404e6fedceec38be7b368623b0492bdaa (patch)
tree27432e2650363756de44e9b6e774be428b2f6a33
parentCleared up much confusion in PollServiceRequestManager. Here's the history: (diff)
parentBulletSim: fix small bug where everything looked like it was colliding (diff)
downloadopensim-SC-2b8de2c404e6fedceec38be7b368623b0492bdaa.zip
opensim-SC-2b8de2c404e6fedceec38be7b368623b0492bdaa.tar.gz
opensim-SC-2b8de2c404e6fedceec38be7b368623b0492bdaa.tar.bz2
opensim-SC-2b8de2c404e6fedceec38be7b368623b0492bdaa.tar.xz
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
-rwxr-xr-xOpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs13
-rw-r--r--OpenSim/Region/Physics/BulletSPlugin/BSScene.cs3
2 files changed, 10 insertions, 6 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs b/OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs
index a41eaf8..fc4545f 100755
--- a/OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs
@@ -103,9 +103,10 @@ public abstract class BSPhysObject : PhysicsActor
103 CollisionsLastTickStep = -1; 103 CollisionsLastTickStep = -1;
104 104
105 SubscribedEventsMs = 0; 105 SubscribedEventsMs = 0;
106 CollidingStep = 0; 106 // Crazy values that will never be true
107 CollidingGroundStep = 0; 107 CollidingStep = BSScene.NotASimulationStep;
108 CollisionAccumulation = 0; 108 CollidingGroundStep = BSScene.NotASimulationStep;
109 CollisionAccumulation = BSScene.NotASimulationStep;
109 ColliderIsMoving = false; 110 ColliderIsMoving = false;
110 CollisionScore = 0; 111 CollisionScore = 0;
111 112
@@ -349,7 +350,7 @@ public abstract class BSPhysObject : PhysicsActor
349 if (value) 350 if (value)
350 CollidingStep = PhysScene.SimulationStep; 351 CollidingStep = PhysScene.SimulationStep;
351 else 352 else
352 CollidingStep = 0; 353 CollidingStep = BSScene.NotASimulationStep;
353 } 354 }
354 } 355 }
355 public override bool CollidingGround { 356 public override bool CollidingGround {
@@ -359,7 +360,7 @@ public abstract class BSPhysObject : PhysicsActor
359 if (value) 360 if (value)
360 CollidingGroundStep = PhysScene.SimulationStep; 361 CollidingGroundStep = PhysScene.SimulationStep;
361 else 362 else
362 CollidingGroundStep = 0; 363 CollidingGroundStep = BSScene.NotASimulationStep;
363 } 364 }
364 } 365 }
365 public override bool CollidingObj { 366 public override bool CollidingObj {
@@ -368,7 +369,7 @@ public abstract class BSPhysObject : PhysicsActor
368 if (value) 369 if (value)
369 CollidingObjectStep = PhysScene.SimulationStep; 370 CollidingObjectStep = PhysScene.SimulationStep;
370 else 371 else
371 CollidingObjectStep = 0; 372 CollidingObjectStep = BSScene.NotASimulationStep;
372 } 373 }
373 } 374 }
374 375
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs b/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs
index 214271b..41aca3b 100644
--- a/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs
@@ -97,6 +97,9 @@ public sealed class BSScene : PhysicsScene, IPhysicsParameters
97 97
98 internal long m_simulationStep = 0; // The current simulation step. 98 internal long m_simulationStep = 0; // The current simulation step.
99 public long SimulationStep { get { return m_simulationStep; } } 99 public long SimulationStep { get { return m_simulationStep; } }
100 // A number to use for SimulationStep that is probably not any step value
101 // Used by the collision code (which remembers the step when a collision happens) to remember not any simulation step.
102 public static long NotASimulationStep = -1234;
100 103
101 internal float LastTimeStep { get; private set; } // The simulation time from the last invocation of Simulate() 104 internal float LastTimeStep { get; private set; } // The simulation time from the last invocation of Simulate()
102 105