diff options
Diffstat (limited to 'OpenSim/Region/PhysicsModules/ubOde/ODEPrim.cs')
-rw-r--r-- | OpenSim/Region/PhysicsModules/ubOde/ODEPrim.cs | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/OpenSim/Region/PhysicsModules/ubOde/ODEPrim.cs b/OpenSim/Region/PhysicsModules/ubOde/ODEPrim.cs index 9f62644..6f2cbbe 100644 --- a/OpenSim/Region/PhysicsModules/ubOde/ODEPrim.cs +++ b/OpenSim/Region/PhysicsModules/ubOde/ODEPrim.cs | |||
@@ -1000,9 +1000,9 @@ namespace OpenSim.Region.PhysicsModule.ubOde | |||
1000 | 1000 | ||
1001 | public override void AddCollisionEvent(uint CollidedWith, ContactPoint contact) | 1001 | public override void AddCollisionEvent(uint CollidedWith, ContactPoint contact) |
1002 | { | 1002 | { |
1003 | |||
1004 | if (CollisionEventsThisFrame == null) | 1003 | if (CollisionEventsThisFrame == null) |
1005 | CollisionEventsThisFrame = new CollisionEventUpdate(); | 1004 | CollisionEventsThisFrame = new CollisionEventUpdate(); |
1005 | |||
1006 | CollisionEventsThisFrame.AddCollider(CollidedWith, contact); | 1006 | CollisionEventsThisFrame.AddCollider(CollidedWith, contact); |
1007 | _parent_scene.AddCollisionEventReporting(this); | 1007 | _parent_scene.AddCollisionEventReporting(this); |
1008 | } | 1008 | } |
@@ -1033,28 +1033,27 @@ namespace OpenSim.Region.PhysicsModule.ubOde | |||
1033 | if (CollisionEventsThisFrame == null) | 1033 | if (CollisionEventsThisFrame == null) |
1034 | return; | 1034 | return; |
1035 | 1035 | ||
1036 | int ncolisions = CollisionEventsThisFrame.m_objCollisionList.Count; | ||
1037 | |||
1036 | if (m_cureventsubscription < m_eventsubscription) | 1038 | if (m_cureventsubscription < m_eventsubscription) |
1037 | return; | 1039 | return; |
1038 | 1040 | ||
1039 | m_cureventsubscription = 0; | ||
1040 | |||
1041 | int ncolisions = CollisionEventsThisFrame.m_objCollisionList.Count; | ||
1042 | |||
1043 | if (!SentEmptyCollisionsEvent || ncolisions > 0) | 1041 | if (!SentEmptyCollisionsEvent || ncolisions > 0) |
1044 | { | 1042 | { |
1045 | base.SendCollisionUpdate(CollisionEventsThisFrame); | 1043 | base.SendCollisionUpdate(CollisionEventsThisFrame); |
1044 | m_cureventsubscription = 0; | ||
1046 | 1045 | ||
1047 | if (ncolisions == 0) | 1046 | if (ncolisions == 0) |
1048 | { | 1047 | { |
1049 | SentEmptyCollisionsEvent = true; | 1048 | SentEmptyCollisionsEvent = true; |
1050 | _parent_scene.RemoveCollisionEventReporting(this); | 1049 | // _parent_scene.RemoveCollisionEventReporting(this); |
1051 | } | 1050 | } |
1052 | else if(Body == IntPtr.Zero || d.BodyIsEnabled(Body)) | 1051 | else if(Body == IntPtr.Zero || d.BodyIsEnabled(Body)) |
1053 | { | 1052 | { |
1054 | SentEmptyCollisionsEvent = false; | 1053 | SentEmptyCollisionsEvent = false; |
1055 | CollisionEventsThisFrame.Clear(); | 1054 | CollisionEventsThisFrame.Clear(); |
1056 | } | 1055 | } |
1057 | } | 1056 | } |
1058 | } | 1057 | } |
1059 | 1058 | ||
1060 | public override bool SubscribedEvents() | 1059 | public override bool SubscribedEvents() |