aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Physics/OdePlugin/OdePlugin.cs')
-rw-r--r--OpenSim/Region/Physics/OdePlugin/OdePlugin.cs14
1 files changed, 11 insertions, 3 deletions
diff --git a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs
index 8b49f70..8d142ab 100644
--- a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs
+++ b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs
@@ -152,9 +152,8 @@ namespace OpenSim.Region.Physics.OdePlugin
152 152
153 public override void RemoveAvatar(PhysicsActor actor) 153 public override void RemoveAvatar(PhysicsActor actor)
154 { 154 {
155 OdeCharacter och = (OdeCharacter)actor; 155 ((OdeCharacter)actor).Destroy();
156 d.BodyDestroy(och.BoundingCapsule); 156 _characters.Remove((OdeCharacter)actor);
157 _characters.Remove(och);
158 } 157 }
159 158
160 public override void RemovePrim(PhysicsActor prim) 159 public override void RemovePrim(PhysicsActor prim)
@@ -449,6 +448,15 @@ namespace OpenSim.Region.Physics.OdePlugin
449 this._position.Y = vec.Y; 448 this._position.Y = vec.Y;
450 this._position.Z = vec.Z; 449 this._position.Z = vec.Z;
451 } 450 }
451
452 public void Destroy()
453 {
454 lock (OdeScene.OdeLock)
455 {
456 d.GeomDestroy(this.capsule_geom);
457 d.BodyDestroy(this.BoundingCapsule);
458 }
459 }
452 } 460 }
453 461
454 public class OdePrim : PhysicsActor 462 public class OdePrim : PhysicsActor