RemoveAvatar called from scene.cs; implemented in ODE. Still issues with multi-region; see bug 410

afrisby
dan miller 2007-09-18 02:38:10 +00:00
parent df0d070762
commit 04e7fcd0e9
2 changed files with 8 additions and 1 deletions

View File

@ -825,6 +825,10 @@ namespace OpenSim.Region.Environment.Scenes
{
presence.CoarseLocationChange(avatar);
presence.ControllingClient.SendKillObject(avatar.RegionHandle, avatar.LocalId);
if (presence.PhysActor != null)
{
phyScene.RemoveAvatar(presence.PhysActor);
}
});
lock (Avatars)

View File

@ -152,6 +152,9 @@ namespace OpenSim.Region.Physics.OdePlugin
public override void RemoveAvatar(PhysicsActor actor)
{
OdeCharacter och = (OdeCharacter)actor;
d.BodyDestroy(och.BoundingCapsule);
_characters.Remove(och);
}
public override void RemovePrim(PhysicsActor prim)
@ -278,7 +281,7 @@ namespace OpenSim.Region.Physics.OdePlugin
private PhysicsVector _acceleration;
private bool flying = false;
//private float gravityAccel;
private IntPtr BoundingCapsule;
public IntPtr BoundingCapsule;
private OdeScene _parent_scene;
public IntPtr capsule_geom;
public d.Mass capsule_mass;