diff options
author | Robert Adams | 2015-08-23 21:15:04 -0700 |
---|---|---|
committer | Robert Adams | 2015-08-23 21:15:04 -0700 |
commit | 062ec0efbda0e4ca6df5541039569e023d0d0e79 (patch) | |
tree | 0ac986a1df10d6df00681464fd75bca4796cbfe8 /OpenSim/Region/Physics/BulletSPlugin/BSScene.cs | |
parent | In ScenePresence, when removing from the physical scene, unsubscribe (diff) | |
download | opensim-SC-062ec0efbda0e4ca6df5541039569e023d0d0e79.zip opensim-SC-062ec0efbda0e4ca6df5541039569e023d0d0e79.tar.gz opensim-SC-062ec0efbda0e4ca6df5541039569e023d0d0e79.tar.bz2 opensim-SC-062ec0efbda0e4ca6df5541039569e023d0d0e79.tar.xz |
BulletSim: delay adding a scene presence to the list of presences
until it is fully configured. Another addition to fixing the
collisions stopping problem.
Diffstat (limited to 'OpenSim/Region/Physics/BulletSPlugin/BSScene.cs')
-rw-r--r-- | OpenSim/Region/Physics/BulletSPlugin/BSScene.cs | 27 |
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 | ||