aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2011-11-15 19:42:33 +0000
committerJustin Clark-Casey (justincc)2011-11-15 19:42:33 +0000
commit45c7789b54c4c04db908a0645ee58e7a285fcccd (patch)
tree9cb79baa4c76864941819730a48fd61d8a6905bb /OpenSim/Region/Physics
parentRemoved unused and mostly commented out SceneCommunicationService methods (diff)
downloadopensim-SC_OLD-45c7789b54c4c04db908a0645ee58e7a285fcccd.zip
opensim-SC_OLD-45c7789b54c4c04db908a0645ee58e7a285fcccd.tar.gz
opensim-SC_OLD-45c7789b54c4c04db908a0645ee58e7a285fcccd.tar.bz2
opensim-SC_OLD-45c7789b54c4c04db908a0645ee58e7a285fcccd.tar.xz
use a more efficient dictionary in OdeScene._collisionEventPrim rather than a list
Diffstat (limited to 'OpenSim/Region/Physics')
-rw-r--r--OpenSim/Region/Physics/OdePlugin/OdeScene.cs11
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