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)
parent
ccf046e8e2
commit
7f2fdb8054
|
@ -84,7 +84,17 @@ namespace OpenSim.Physics.BasicPhysicsPlugin
|
|||
_actors.Add(act);
|
||||
return act;
|
||||
}
|
||||
|
||||
|
||||
public override void RemoveAvatar(PhysicsActor actor)
|
||||
{
|
||||
BasicActor act = (BasicActor)actor;
|
||||
if(_actors.Contains(act))
|
||||
{
|
||||
_actors.Remove(act);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public override PhysicsActor AddPrim(PhysicsVector position, PhysicsVector size)
|
||||
{
|
||||
return null;
|
||||
|
|
|
@ -44,6 +44,8 @@ namespace OpenSim.Physics.Manager
|
|||
|
||||
public abstract PhysicsActor AddAvatar(PhysicsVector position);
|
||||
|
||||
public abstract void RemoveAvatar(PhysicsActor actor);
|
||||
|
||||
public abstract PhysicsActor AddPrim(PhysicsVector position, PhysicsVector size);
|
||||
|
||||
public abstract void Simulate(float timeStep);
|
||||
|
@ -70,6 +72,11 @@ namespace OpenSim.Physics.Manager
|
|||
return PhysicsActor.Null;
|
||||
}
|
||||
|
||||
public override void RemoveAvatar(PhysicsActor actor)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override PhysicsActor AddPrim(PhysicsVector position, PhysicsVector size)
|
||||
{
|
||||
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(LogPriority.VERBOSE, "NullPhysicsScene : AddPrim({0},{1})", position, size);
|
||||
|
|
|
@ -131,6 +131,11 @@ namespace OpenSim.Physics.OdePlugin
|
|||
return newAv;
|
||||
}
|
||||
|
||||
public override void RemoveAvatar(PhysicsActor actor)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override PhysicsActor AddPrim(PhysicsVector position, PhysicsVector size)
|
||||
{
|
||||
PhysicsVector pos = new PhysicsVector();
|
||||
|
|
|
@ -121,6 +121,11 @@ namespace OpenSim.Physics.PhysXPlugin
|
|||
_characters.Add(act);
|
||||
return act;
|
||||
}
|
||||
|
||||
public override void RemoveAvatar(PhysicsActor actor)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override PhysicsActor AddPrim(PhysicsVector position, PhysicsVector size)
|
||||
{
|
||||
|
|
|
@ -72,6 +72,10 @@ namespace OpenSim.world
|
|||
{
|
||||
this._physActor = value;
|
||||
}
|
||||
get
|
||||
{
|
||||
return _physActor;
|
||||
}
|
||||
}
|
||||
|
||||
public override void addForces()
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue