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.cs27
1 files changed, 14 insertions, 13 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs b/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs
index 8a19944..2a8a6a5 100644
--- a/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs
@@ -477,16 +477,19 @@ public sealed class BSScene : PhysicsScene, IPhysicsParameters
477 477
478 if (!m_initialized) return null; 478 if (!m_initialized) return null;
479 479
480 BSCharacter actor = new BSCharacter(localID, avName, this, position, velocity, size, isFlying); 480 BSCharacter actor = new BSCharacter(localID, avName, this, position, velocity, size, isFlying,
481 lock (PhysObjects) 481 (aa) =>
482 PhysObjects.Add(localID, actor); 482 {
483 483 // While the actor exists, don't add it to the active avatar lists until completely initialized
484 // TODO: Remove kludge someday. 484 lock (PhysObjects)
485 // We must generate a collision for avatars whether they collide or not. 485 PhysObjects.Add(localID, aa);
486 // This is required by OpenSim to update avatar animations, etc.
487 lock (AvatarsInSceneLock)
488 AvatarsInScene.Add(actor);
489 486
487 // TODO: Remove kludge someday.
488 // We must generate a collision for avatars whether they collide or not.
489 // This is required by OpenSim to update avatar animations, etc.
490 lock (AvatarsInSceneLock)
491 AvatarsInScene.Add(aa);
492 });
490 return actor; 493 return actor;
491 } 494 }
492 495
@@ -830,10 +833,8 @@ public sealed class BSScene : PhysicsScene, IPhysicsParameters
830 if (collider.Collide(collidingWith, collidee, collidePoint, collideNormal, penetration)) 833 if (collider.Collide(collidingWith, collidee, collidePoint, collideNormal, penetration))
831 { 834 {
832 // If a collision was 'good', remember to send it to the simulator 835 // If a collision was 'good', remember to send it to the simulator
833 lock (CollisionLock) 836 // Note that 'CollisionLock' was locked before the call to 'SendCollsions'
834 { 837 ObjectsWithCollisions.Add(collider);
835 ObjectsWithCollisions.Add(collider);
836 }
837 } 838 }
838 } 839 }
839 840