diff options
author | Robert Adams | 2013-08-14 14:13:08 -0700 |
---|---|---|
committer | Robert Adams | 2013-08-14 14:49:22 -0700 |
commit | 7c3b71d294987943058c8b3bcb18a424ca70dea5 (patch) | |
tree | 1344c3f5c3a1a63a34c07105b6487a608bbd44d6 /OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs | |
parent | Add stat clientstack.<scene>.IncomingPacketsOrphanedCount to record well-form... (diff) | |
download | opensim-SC-7c3b71d294987943058c8b3bcb18a424ca70dea5.zip opensim-SC-7c3b71d294987943058c8b3bcb18a424ca70dea5.tar.gz opensim-SC-7c3b71d294987943058c8b3bcb18a424ca70dea5.tar.bz2 opensim-SC-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/BSPrim.cs')
-rw-r--r-- | OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs b/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs index 6b5dea3..d5b999d 100644 --- a/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs | |||
@@ -110,6 +110,8 @@ public class BSPrim : BSPhysObject | |||
110 | CreateGeomAndObject(true); | 110 | CreateGeomAndObject(true); |
111 | 111 | ||
112 | CurrentCollisionFlags = PhysScene.PE.GetCollisionFlags(PhysBody); | 112 | CurrentCollisionFlags = PhysScene.PE.GetCollisionFlags(PhysBody); |
113 | |||
114 | IsInitialized = true; | ||
113 | }); | 115 | }); |
114 | } | 116 | } |
115 | 117 | ||
@@ -117,6 +119,8 @@ public class BSPrim : BSPhysObject | |||
117 | public override void Destroy() | 119 | public override void Destroy() |
118 | { | 120 | { |
119 | // m_log.DebugFormat("{0}: Destroy, id={1}", LogHeader, LocalID); | 121 | // m_log.DebugFormat("{0}: Destroy, id={1}", LogHeader, LocalID); |
122 | IsInitialized = false; | ||
123 | |||
120 | base.Destroy(); | 124 | base.Destroy(); |
121 | 125 | ||
122 | // Undo any vehicle properties | 126 | // Undo any vehicle properties |