diff options
Diffstat (limited to 'OpenSim/Region/Physics/OdePlugin/ODEPrim.cs')
-rw-r--r-- | OpenSim/Region/Physics/OdePlugin/ODEPrim.cs | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs index 6638cbd..3a17511 100644 --- a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs +++ b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs | |||
@@ -191,7 +191,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
191 | private d.Mass pMass; | 191 | private d.Mass pMass; |
192 | 192 | ||
193 | private int m_eventsubscription; | 193 | private int m_eventsubscription; |
194 | private CollisionEventUpdate CollisionEventsThisFrame; | 194 | private CollisionEventUpdate CollisionEventsThisFrame = new CollisionEventUpdate(); |
195 | 195 | ||
196 | private IntPtr m_linkJoint = IntPtr.Zero; | 196 | private IntPtr m_linkJoint = IntPtr.Zero; |
197 | 197 | ||
@@ -3020,23 +3020,13 @@ Console.WriteLine(" JointCreateFixed"); | |||
3020 | 3020 | ||
3021 | public void AddCollisionEvent(uint CollidedWith, ContactPoint contact) | 3021 | public void AddCollisionEvent(uint CollidedWith, ContactPoint contact) |
3022 | { | 3022 | { |
3023 | if (CollisionEventsThisFrame == null) | 3023 | CollisionEventsThisFrame.AddCollider(CollidedWith, contact); |
3024 | CollisionEventsThisFrame = new CollisionEventUpdate(); | ||
3025 | |||
3026 | CollisionEventsThisFrame.addCollider(CollidedWith, contact); | ||
3027 | } | 3024 | } |
3028 | 3025 | ||
3029 | public void SendCollisions() | 3026 | public void SendCollisions() |
3030 | { | 3027 | { |
3031 | if (CollisionEventsThisFrame == null) | 3028 | if (CollisionEventsThisFrame.Count > 0) |
3032 | return; | 3029 | base.SendCollisionUpdate(CollisionEventsThisFrame); |
3033 | |||
3034 | base.SendCollisionUpdate(CollisionEventsThisFrame); | ||
3035 | |||
3036 | if (CollisionEventsThisFrame.m_objCollisionList.Count == 0) | ||
3037 | CollisionEventsThisFrame = null; | ||
3038 | else | ||
3039 | CollisionEventsThisFrame = new CollisionEventUpdate(); | ||
3040 | } | 3030 | } |
3041 | 3031 | ||
3042 | public override bool SubscribedEvents() | 3032 | public override bool SubscribedEvents() |