Simplify some manipulation of _taintedActors in OdeScene

0.7.2-post-fixes
Justin Clark-Casey (justincc) 2011-12-14 18:33:44 +00:00
parent cfdccdd71c
commit 903da8acbd
1 changed files with 6 additions and 13 deletions

View File

@ -2614,12 +2614,9 @@ namespace OpenSim.Region.Physics.OdePlugin
OdeCharacter taintedchar = ((OdeCharacter)actor);
lock (_taintedActors)
{
if (!(_taintedActors.Contains(taintedchar)))
{
_taintedActors.Add(taintedchar);
if (taintedchar.bad)
m_log.DebugFormat("[ODE SCENE]: Added BAD actor {0} to tainted actors", taintedchar.m_uuid);
}
_taintedActors.Add(taintedchar);
if (taintedchar.bad)
m_log.ErrorFormat("[ODE SCENE]: Added BAD actor {0} to tainted actors", taintedchar.m_uuid);
}
}
}
@ -2700,14 +2697,10 @@ namespace OpenSim.Region.Physics.OdePlugin
{
lock (_taintedActors)
{
if (_taintedActors.Count > 0)
{
foreach (OdeCharacter character in _taintedActors)
character.ProcessTaints();
foreach (OdeCharacter character in _taintedActors)
character.ProcessTaints();
if (_taintedActors.Count > 0)
_taintedActors.Clear();
}
_taintedActors.Clear();
}
lock (_taintedPrims)