diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Physics/OdePlugin/OdeScene.cs | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/OpenSim/Region/Physics/OdePlugin/OdeScene.cs b/OpenSim/Region/Physics/OdePlugin/OdeScene.cs index cd2b156..e1e031f 100644 --- a/OpenSim/Region/Physics/OdePlugin/OdeScene.cs +++ b/OpenSim/Region/Physics/OdePlugin/OdeScene.cs | |||
@@ -198,7 +198,12 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
198 | private readonly List<OdePrim> _taintedPrimL = new List<OdePrim>(); | 198 | private readonly List<OdePrim> _taintedPrimL = new List<OdePrim>(); |
199 | private readonly HashSet<OdeCharacter> _taintedActors = new HashSet<OdeCharacter>(); | 199 | private readonly HashSet<OdeCharacter> _taintedActors = new HashSet<OdeCharacter>(); |
200 | private readonly List<d.ContactGeom> _perloopContact = new List<d.ContactGeom>(); | 200 | private readonly List<d.ContactGeom> _perloopContact = new List<d.ContactGeom>(); |
201 | |||
202 | /// <summary> | ||
203 | /// A list of actors that should receive collision events. | ||
204 | /// </summary> | ||
201 | private readonly List<PhysicsActor> _collisionEventPrim = new List<PhysicsActor>(); | 205 | private readonly List<PhysicsActor> _collisionEventPrim = new List<PhysicsActor>(); |
206 | |||
202 | private readonly HashSet<OdeCharacter> _badCharacter = new HashSet<OdeCharacter>(); | 207 | private readonly HashSet<OdeCharacter> _badCharacter = new HashSet<OdeCharacter>(); |
203 | public Dictionary<IntPtr, String> geom_name_map = new Dictionary<IntPtr, String>(); | 208 | public Dictionary<IntPtr, String> geom_name_map = new Dictionary<IntPtr, String>(); |
204 | public Dictionary<IntPtr, PhysicsActor> actor_name_map = new Dictionary<IntPtr, PhysicsActor>(); | 209 | public Dictionary<IntPtr, PhysicsActor> actor_name_map = new Dictionary<IntPtr, PhysicsActor>(); |
@@ -1604,7 +1609,11 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1604 | } | 1609 | } |
1605 | // End recovered. Kitto Flora | 1610 | // End recovered. Kitto Flora |
1606 | 1611 | ||
1607 | public void addCollisionEventReporting(PhysicsActor obj) | 1612 | /// <summary> |
1613 | /// Add actor to the list that should receive collision events in the simulate loop. | ||
1614 | /// </summary> | ||
1615 | /// <param name="obj"></param> | ||
1616 | public void AddCollisionEventReporting(PhysicsActor obj) | ||
1608 | { | 1617 | { |
1609 | lock (_collisionEventPrim) | 1618 | lock (_collisionEventPrim) |
1610 | { | 1619 | { |
@@ -1613,7 +1622,11 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1613 | } | 1622 | } |
1614 | } | 1623 | } |
1615 | 1624 | ||
1616 | public void remCollisionEventReporting(PhysicsActor obj) | 1625 | /// <summary> |
1626 | /// Remove actor from the list that should receive collision events in the simulate loop. | ||
1627 | /// </summary> | ||
1628 | /// <param name="obj"></param> | ||
1629 | public void RemoveCollisionEventReporting(PhysicsActor obj) | ||
1617 | { | 1630 | { |
1618 | lock (_collisionEventPrim) | 1631 | lock (_collisionEventPrim) |
1619 | { | 1632 | { |
@@ -2132,7 +2145,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
2132 | //Console.WriteLine("RemovePrimThreadLocked " + prim.m_primName); | 2145 | //Console.WriteLine("RemovePrimThreadLocked " + prim.m_primName); |
2133 | lock (prim) | 2146 | lock (prim) |
2134 | { | 2147 | { |
2135 | remCollisionEventReporting(prim); | 2148 | RemoveCollisionEventReporting(prim); |
2136 | lock (ode) | 2149 | lock (ode) |
2137 | { | 2150 | { |
2138 | if (prim.prim_geom != IntPtr.Zero) | 2151 | if (prim.prim_geom != IntPtr.Zero) |
@@ -2792,6 +2805,8 @@ Console.WriteLine("AddPhysicsActorTaint to " + taintedprim.Name); | |||
2792 | if (obj == null) | 2805 | if (obj == null) |
2793 | continue; | 2806 | continue; |
2794 | 2807 | ||
2808 | // m_log.DebugFormat("[PHYSICS]: Assessing {0} for collision events", obj.SOPName); | ||
2809 | |||
2795 | switch ((ActorTypes)obj.PhysicsActorType) | 2810 | switch ((ActorTypes)obj.PhysicsActorType) |
2796 | { | 2811 | { |
2797 | case ActorTypes.Agent: | 2812 | case ActorTypes.Agent: |
@@ -2799,6 +2814,7 @@ Console.WriteLine("AddPhysicsActorTaint to " + taintedprim.Name); | |||
2799 | cobj.AddCollisionFrameTime(100); | 2814 | cobj.AddCollisionFrameTime(100); |
2800 | cobj.SendCollisions(); | 2815 | cobj.SendCollisions(); |
2801 | break; | 2816 | break; |
2817 | |||
2802 | case ActorTypes.Prim: | 2818 | case ActorTypes.Prim: |
2803 | OdePrim pobj = (OdePrim)obj; | 2819 | OdePrim pobj = (OdePrim)obj; |
2804 | pobj.SendCollisions(); | 2820 | pobj.SendCollisions(); |