From e830a778607337a6aab27dd29e5657e3f8aa6b76 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Wed, 14 Dec 2011 18:33:44 +0000 Subject: Simplify some manipulation of _taintedActors in OdeScene --- OpenSim/Region/Physics/OdePlugin/OdeScene.cs | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) (limited to 'OpenSim/Region/Physics') diff --git a/OpenSim/Region/Physics/OdePlugin/OdeScene.cs b/OpenSim/Region/Physics/OdePlugin/OdeScene.cs index 6ceb106..a6c2eca 100644 --- a/OpenSim/Region/Physics/OdePlugin/OdeScene.cs +++ b/OpenSim/Region/Physics/OdePlugin/OdeScene.cs @@ -2612,12 +2612,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); } } } @@ -2714,14 +2711,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) -- cgit v1.1