aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs
diff options
context:
space:
mode:
authorRobert Adams2013-08-14 14:13:08 -0700
committerRobert Adams2013-08-14 14:49:22 -0700
commit7c3b71d294987943058c8b3bcb18a424ca70dea5 (patch)
tree1344c3f5c3a1a63a34c07105b6487a608bbd44d6 /OpenSim/Region/Physics/BulletSPlugin/BSScene.cs
parentAdd stat clientstack.<scene>.IncomingPacketsOrphanedCount to record well-form... (diff)
downloadopensim-SC_OLD-7c3b71d294987943058c8b3bcb18a424ca70dea5.zip
opensim-SC_OLD-7c3b71d294987943058c8b3bcb18a424ca70dea5.tar.gz
opensim-SC_OLD-7c3b71d294987943058c8b3bcb18a424ca70dea5.tar.bz2
opensim-SC_OLD-7c3b71d294987943058c8b3bcb18a424ca70dea5.tar.xz
BulletSim: add physical object initialized flag so updates and collisions
don't happen until the object is completely initialized. This fixes the problem of doing a teleport while the simulator is running. The destruction of the physical object while the engine is running means that the physics parameter update would overwrite the new position of the newly created avatar.
Diffstat (limited to 'OpenSim/Region/Physics/BulletSPlugin/BSScene.cs')
-rw-r--r--OpenSim/Region/Physics/BulletSPlugin/BSScene.cs12
1 files changed, 8 insertions, 4 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs b/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs
index 79ac5a5..88d50b4 100644
--- a/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs
@@ -639,7 +639,8 @@ public sealed class BSScene : PhysicsScene, IPhysicsParameters
639 BSPhysObject pobj; 639 BSPhysObject pobj;
640 if (PhysObjects.TryGetValue(entprop.ID, out pobj)) 640 if (PhysObjects.TryGetValue(entprop.ID, out pobj))
641 { 641 {
642 pobj.UpdateProperties(entprop); 642 if (pobj.IsInitialized)
643 pobj.UpdateProperties(entprop);
643 } 644 }
644 } 645 }
645 } 646 }
@@ -766,10 +767,13 @@ public sealed class BSScene : PhysicsScene, IPhysicsParameters
766 767
767 // DetailLog("{0},BSScene.SendCollision,collide,id={1},with={2}", DetailLogZero, localID, collidingWith); 768 // DetailLog("{0},BSScene.SendCollision,collide,id={1},with={2}", DetailLogZero, localID, collidingWith);
768 769
769 if (collider.Collide(collidingWith, collidee, collidePoint, collideNormal, penetration)) 770 if (collider.IsInitialized)
770 { 771 {
771 // If a collision was 'good', remember to send it to the simulator 772 if (collider.Collide(collidingWith, collidee, collidePoint, collideNormal, penetration))
772 ObjectsWithCollisions.Add(collider); 773 {
774 // If a collision was 'good', remember to send it to the simulator
775 ObjectsWithCollisions.Add(collider);
776 }
773 } 777 }
774 778
775 return; 779 return;