diff options
Diffstat (limited to '')
-rwxr-xr-x | OpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs b/OpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs index e7d8d14..6f819d8 100755 --- a/OpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs | |||
@@ -143,7 +143,7 @@ public sealed class BSShapeCollection : IDisposable | |||
143 | { | 143 | { |
144 | if (!BulletSimAPI.IsInWorld2(body.ptr)) | 144 | if (!BulletSimAPI.IsInWorld2(body.ptr)) |
145 | { | 145 | { |
146 | BulletSimAPI.AddObjectToWorld2(PhysicsScene.World.ptr, body.ptr); | 146 | PhysicsScene.PE.AddObjectToWorld(PhysicsScene.World, body); |
147 | if (DDetail) DetailLog("{0},BSShapeCollection.ReferenceBody,addedToWorld,ref={1}", body.ID, body); | 147 | if (DDetail) DetailLog("{0},BSShapeCollection.ReferenceBody,addedToWorld,ref={1}", body.ID, body); |
148 | } | 148 | } |
149 | }); | 149 | }); |
@@ -168,12 +168,12 @@ public sealed class BSShapeCollection : IDisposable | |||
168 | 168 | ||
169 | if (BulletSimAPI.IsInWorld2(body.ptr)) | 169 | if (BulletSimAPI.IsInWorld2(body.ptr)) |
170 | { | 170 | { |
171 | BulletSimAPI.RemoveObjectFromWorld2(PhysicsScene.World.ptr, body.ptr); | 171 | PhysicsScene.PE.RemoveObjectFromWorld(PhysicsScene.World, body); |
172 | if (DDetail) DetailLog("{0},BSShapeCollection.DereferenceBody,removingFromWorld. Body={1}", body.ID, body); | 172 | if (DDetail) DetailLog("{0},BSShapeCollection.DereferenceBody,removingFromWorld. Body={1}", body.ID, body); |
173 | } | 173 | } |
174 | 174 | ||
175 | // Zero any reference to the shape so it is not freed when the body is deleted. | 175 | // Zero any reference to the shape so it is not freed when the body is deleted. |
176 | BulletSimAPI.SetCollisionShape2(PhysicsScene.World.ptr, body.ptr, IntPtr.Zero); | 176 | PhysicsScene.PE.SetCollisionShape(PhysicsScene.World, body, new BulletShape()); |
177 | PhysicsScene.PE.DestroyObject(PhysicsScene.World, body); | 177 | PhysicsScene.PE.DestroyObject(PhysicsScene.World, body); |
178 | }); | 178 | }); |
179 | } | 179 | } |