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.cs10
1 files changed, 8 insertions, 2 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs b/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs
index 23bada9..17d26a9 100644
--- a/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs
@@ -705,7 +705,10 @@ public sealed class BSScene : PhysicsScene, IPhysicsParameters
705 // this is is under UpdateLock. 705 // this is is under UpdateLock.
706 public void PostUpdate(BSPhysObject updatee) 706 public void PostUpdate(BSPhysObject updatee)
707 { 707 {
708 ObjectsWithUpdates.Add(updatee); 708 lock (UpdateLock)
709 {
710 ObjectsWithUpdates.Add(updatee);
711 }
709 } 712 }
710 713
711 // The simulator thinks it is physics time so return all the collisions and position 714 // The simulator thinks it is physics time so return all the collisions and position
@@ -803,7 +806,10 @@ public sealed class BSScene : PhysicsScene, IPhysicsParameters
803 if (collider.Collide(collidingWith, collidee, collidePoint, collideNormal, penetration)) 806 if (collider.Collide(collidingWith, collidee, collidePoint, collideNormal, penetration))
804 { 807 {
805 // If a collision was 'good', remember to send it to the simulator 808 // If a collision was 'good', remember to send it to the simulator
806 ObjectsWithCollisions.Add(collider); 809 lock (CollisionLock)
810 {
811 ObjectsWithCollisions.Add(collider);
812 }
807 } 813 }
808 } 814 }
809 815