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/BSCharacter.cs | |
parent | Add stat clientstack.<scene>.IncomingPacketsOrphanedCount to record well-form... (diff) | |
download | opensim-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/BSCharacter.cs')
-rw-r--r-- | OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs b/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs index 502f85f..291dfcd 100644 --- a/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs | |||
@@ -107,6 +107,8 @@ public sealed class BSCharacter : BSPhysObject | |||
107 | PhysicalActors.Add(AvatarMoveActorName, m_moveActor); | 107 | PhysicalActors.Add(AvatarMoveActorName, m_moveActor); |
108 | 108 | ||
109 | SetPhysicalProperties(); | 109 | SetPhysicalProperties(); |
110 | |||
111 | IsInitialized = true; | ||
110 | }); | 112 | }); |
111 | return; | 113 | return; |
112 | } | 114 | } |
@@ -114,6 +116,8 @@ public sealed class BSCharacter : BSPhysObject | |||
114 | // called when this character is being destroyed and the resources should be released | 116 | // called when this character is being destroyed and the resources should be released |
115 | public override void Destroy() | 117 | public override void Destroy() |
116 | { | 118 | { |
119 | IsInitialized = false; | ||
120 | |||
117 | base.Destroy(); | 121 | base.Destroy(); |
118 | 122 | ||
119 | DetailLog("{0},BSCharacter.Destroy", LocalID); | 123 | DetailLog("{0},BSCharacter.Destroy", LocalID); |