diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Physics/OdePlugin/OdeScene.cs | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/OpenSim/Region/Physics/OdePlugin/OdeScene.cs b/OpenSim/Region/Physics/OdePlugin/OdeScene.cs index c3279c6..a4e5c1e 100644 --- a/OpenSim/Region/Physics/OdePlugin/OdeScene.cs +++ b/OpenSim/Region/Physics/OdePlugin/OdeScene.cs | |||
@@ -221,7 +221,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
221 | /// <summary> | 221 | /// <summary> |
222 | /// A list of actors that should receive collision events. | 222 | /// A list of actors that should receive collision events. |
223 | /// </summary> | 223 | /// </summary> |
224 | private readonly List<PhysicsActor> _collisionEventPrim = new List<PhysicsActor>(); | 224 | private readonly Dictionary<uint, PhysicsActor> _collisionEventPrim = new Dictionary<uint, PhysicsActor>(); |
225 | 225 | ||
226 | private readonly HashSet<OdeCharacter> _badCharacter = new HashSet<OdeCharacter>(); | 226 | private readonly HashSet<OdeCharacter> _badCharacter = new HashSet<OdeCharacter>(); |
227 | public Dictionary<IntPtr, String> geom_name_map = new Dictionary<IntPtr, String>(); | 227 | public Dictionary<IntPtr, String> geom_name_map = new Dictionary<IntPtr, String>(); |
@@ -1636,10 +1636,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1636 | // m_log.DebugFormat("[PHYSICS]: Adding {0} to collision event reporting", obj.SOPName); | 1636 | // m_log.DebugFormat("[PHYSICS]: Adding {0} to collision event reporting", obj.SOPName); |
1637 | 1637 | ||
1638 | lock (_collisionEventPrim) | 1638 | lock (_collisionEventPrim) |
1639 | { | 1639 | _collisionEventPrim[obj.LocalID] = obj; |
1640 | if (!_collisionEventPrim.Contains(obj)) | ||
1641 | _collisionEventPrim.Add(obj); | ||
1642 | } | ||
1643 | } | 1640 | } |
1644 | 1641 | ||
1645 | /// <summary> | 1642 | /// <summary> |
@@ -1651,7 +1648,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1651 | // m_log.DebugFormat("[PHYSICS]: Removing {0} from collision event reporting", obj.SOPName); | 1648 | // m_log.DebugFormat("[PHYSICS]: Removing {0} from collision event reporting", obj.SOPName); |
1652 | 1649 | ||
1653 | lock (_collisionEventPrim) | 1650 | lock (_collisionEventPrim) |
1654 | _collisionEventPrim.Remove(obj); | 1651 | _collisionEventPrim.Remove(obj.LocalID); |
1655 | } | 1652 | } |
1656 | 1653 | ||
1657 | #region Add/Remove Entities | 1654 | #region Add/Remove Entities |
@@ -2792,7 +2789,7 @@ Console.WriteLine("AddPhysicsActorTaint to " + taintedprim.Name); | |||
2792 | 2789 | ||
2793 | lock (_collisionEventPrim) | 2790 | lock (_collisionEventPrim) |
2794 | { | 2791 | { |
2795 | foreach (PhysicsActor obj in _collisionEventPrim) | 2792 | foreach (PhysicsActor obj in _collisionEventPrim.Values) |
2796 | { | 2793 | { |
2797 | // m_log.DebugFormat("[PHYSICS]: Assessing {0} for collision events", obj.SOPName); | 2794 | // m_log.DebugFormat("[PHYSICS]: Assessing {0} for collision events", obj.SOPName); |
2798 | 2795 | ||