Merge branch 'master' of ssh://opensimulator.org/var/git/opensim into prioritization

prioritization
John Hurliman 2009-10-16 12:42:53 -07:00
commit eee1318597
2 changed files with 22 additions and 1 deletions

View File

@ -1109,10 +1109,10 @@ namespace OpenSim.Region.Physics.OdePlugin
try
{
vec = d.BodyGetPosition(Body);
}
catch (NullReferenceException)
{
_parent_scene.BadCharacter(this);
vec = new d.Vector3(_position.X, _position.Y, _position.Z);
base.RaiseOutOfBounds(_position); // Tells ScenePresence that there's a problem!
m_log.WarnFormat("[ODEPLUGIN]: Avatar Null reference for Avatar: {0}", m_name);

View File

@ -242,6 +242,7 @@ namespace OpenSim.Region.Physics.OdePlugin
private readonly HashSet<OdeCharacter> _taintedActors = new HashSet<OdeCharacter>();
private readonly List<d.ContactGeom> _perloopContact = new List<d.ContactGeom>();
private readonly List<PhysicsActor> _collisionEventPrim = new List<PhysicsActor>();
private readonly HashSet<OdeCharacter> _badCharacter = new HashSet<OdeCharacter>();
public Dictionary<IntPtr, String> geom_name_map = new Dictionary<IntPtr, String>();
public Dictionary<IntPtr, PhysicsActor> actor_name_map = new Dictionary<IntPtr, PhysicsActor>();
private bool m_NINJA_physics_joints_enabled = false;
@ -1677,6 +1678,14 @@ namespace OpenSim.Region.Physics.OdePlugin
}
}
}
public void BadCharacter(OdeCharacter chr)
{
lock (_badCharacter)
{
if (!_badCharacter.Contains(chr))
_badCharacter.Add(chr);
}
}
public override void RemoveAvatar(PhysicsActor actor)
{
@ -2975,6 +2984,18 @@ namespace OpenSim.Region.Physics.OdePlugin
}
}
lock (_badCharacter)
{
if (_badCharacter.Count > 0)
{
foreach (OdeCharacter chr in _badCharacter)
{
RemoveCharacter(chr);
}
_badCharacter.Clear();
}
}
lock (_activeprims)
{
//if (timeStep < 0.2f)