From 7f2fdb80546d5c567d3a3028b1eb29ba4da7cea9 Mon Sep 17 00:00:00 2001 From: MW Date: Tue, 15 May 2007 21:26:10 +0000 Subject: Added RemoveAvatar() method to physics plugins, should be called on log out (needs doing) and when downgrading a client to a child-avatar (should be working) --- OpenSim.RegionServer/world/Avatar.cs | 4 ++++ OpenSim.RegionServer/world/World.cs | 4 ++++ 2 files changed, 8 insertions(+) (limited to 'OpenSim.RegionServer/world') diff --git a/OpenSim.RegionServer/world/Avatar.cs b/OpenSim.RegionServer/world/Avatar.cs index f8a1a5a..c684c45 100644 --- a/OpenSim.RegionServer/world/Avatar.cs +++ b/OpenSim.RegionServer/world/Avatar.cs @@ -72,6 +72,10 @@ namespace OpenSim.world { this._physActor = value; } + get + { + return _physActor; + } } public override void addForces() diff --git a/OpenSim.RegionServer/world/World.cs b/OpenSim.RegionServer/world/World.cs index e89f8f4..4dfe0e9 100644 --- a/OpenSim.RegionServer/world/World.cs +++ b/OpenSim.RegionServer/world/World.cs @@ -600,6 +600,10 @@ namespace OpenSim.world { Avatars.Remove(agentClient.AgentID); } + if (agentClient.ClientAvatar.PhysActor != null) + { + this.phyScene.RemoveAvatar(agentClient.ClientAvatar.PhysActor); + } } catch (Exception e) { -- cgit v1.1