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/BSPhysObject.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/BSPhysObject.cs')
-rwxr-xr-x | OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs b/OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs index 27caf62..b26fef0 100755 --- a/OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs | |||
@@ -72,6 +72,8 @@ public abstract class BSPhysObject : PhysicsActor | |||
72 | } | 72 | } |
73 | protected BSPhysObject(BSScene parentScene, uint localID, string name, string typeName) | 73 | protected BSPhysObject(BSScene parentScene, uint localID, string name, string typeName) |
74 | { | 74 | { |
75 | IsInitialized = false; | ||
76 | |||
75 | PhysScene = parentScene; | 77 | PhysScene = parentScene; |
76 | LocalID = localID; | 78 | LocalID = localID; |
77 | PhysObjectName = name; | 79 | PhysObjectName = name; |
@@ -130,6 +132,8 @@ public abstract class BSPhysObject : PhysicsActor | |||
130 | public string PhysObjectName { get; protected set; } | 132 | public string PhysObjectName { get; protected set; } |
131 | public string TypeName { get; protected set; } | 133 | public string TypeName { get; protected set; } |
132 | 134 | ||
135 | // Set to 'true' when the object is completely initialized | ||
136 | public bool IsInitialized { get; protected set; } | ||
133 | 137 | ||
134 | // Return the object mass without calculating it or having side effects | 138 | // Return the object mass without calculating it or having side effects |
135 | public abstract float RawMass { get; } | 139 | public abstract float RawMass { get; } |