aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPart.cs1
-rw-r--r--OpenSim/Region/Physics/OdePlugin/ODECharacter.cs7
-rw-r--r--OpenSim/Region/Physics/OdePlugin/ODEPrim.cs4
-rw-r--r--OpenSim/Region/Physics/OdePlugin/OdeScene.cs22
4 files changed, 26 insertions, 8 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index 5791b95..58fc6fc 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -4821,7 +4821,6 @@ namespace OpenSim.Region.Framework.Scenes
4821 { 4821 {
4822 PhysActor.OnCollisionUpdate += PhysicsCollision; 4822 PhysActor.OnCollisionUpdate += PhysicsCollision;
4823 PhysActor.SubscribeEvents(1000); 4823 PhysActor.SubscribeEvents(1000);
4824
4825 } 4824 }
4826 } 4825 }
4827 else 4826 else
diff --git a/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs b/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs
index 6b74e74..7766691 100644
--- a/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs
+++ b/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs
@@ -1220,14 +1220,16 @@ namespace OpenSim.Region.Physics.OdePlugin
1220 { 1220 {
1221 m_requestedUpdateFrequency = ms; 1221 m_requestedUpdateFrequency = ms;
1222 m_eventsubscription = ms; 1222 m_eventsubscription = ms;
1223 _parent_scene.addCollisionEventReporting(this); 1223 _parent_scene.AddCollisionEventReporting(this);
1224 } 1224 }
1225
1225 public override void UnSubscribeEvents() 1226 public override void UnSubscribeEvents()
1226 { 1227 {
1227 _parent_scene.remCollisionEventReporting(this); 1228 _parent_scene.RemoveCollisionEventReporting(this);
1228 m_requestedUpdateFrequency = 0; 1229 m_requestedUpdateFrequency = 0;
1229 m_eventsubscription = 0; 1230 m_eventsubscription = 0;
1230 } 1231 }
1232
1231 public void AddCollisionEvent(uint CollidedWith, ContactPoint contact) 1233 public void AddCollisionEvent(uint CollidedWith, ContactPoint contact)
1232 { 1234 {
1233 if (m_eventsubscription > 0) 1235 if (m_eventsubscription > 0)
@@ -1248,6 +1250,7 @@ namespace OpenSim.Region.Physics.OdePlugin
1248 m_eventsubscription = 0; 1250 m_eventsubscription = 0;
1249 } 1251 }
1250 } 1252 }
1253
1251 public override bool SubscribedEvents() 1254 public override bool SubscribedEvents()
1252 { 1255 {
1253 if (m_eventsubscription > 0) 1256 if (m_eventsubscription > 0)
diff --git a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
index b3045bd..34c0deb 100644
--- a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
+++ b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
@@ -2986,12 +2986,12 @@ Console.WriteLine("changeshape not need meshing");
2986 public override void SubscribeEvents(int ms) 2986 public override void SubscribeEvents(int ms)
2987 { 2987 {
2988 m_eventsubscription = ms; 2988 m_eventsubscription = ms;
2989 _parent_scene.addCollisionEventReporting(this); 2989 _parent_scene.AddCollisionEventReporting(this);
2990 } 2990 }
2991 2991
2992 public override void UnSubscribeEvents() 2992 public override void UnSubscribeEvents()
2993 { 2993 {
2994 _parent_scene.remCollisionEventReporting(this); 2994 _parent_scene.RemoveCollisionEventReporting(this);
2995 m_eventsubscription = 0; 2995 m_eventsubscription = 0;
2996 } 2996 }
2997 2997
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();