diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Physics/OdePlugin/ODECharacter.cs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs b/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs index e9bab66..c22d27f 100644 --- a/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs +++ b/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs | |||
@@ -1210,11 +1210,13 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1210 | { | 1210 | { |
1211 | m_requestedUpdateFrequency = ms; | 1211 | m_requestedUpdateFrequency = ms; |
1212 | m_eventsubscription = ms; | 1212 | m_eventsubscription = ms; |
1213 | CollisionEventsThisFrame.Clear(); | ||
1213 | _parent_scene.AddCollisionEventReporting(this); | 1214 | _parent_scene.AddCollisionEventReporting(this); |
1214 | } | 1215 | } |
1215 | 1216 | ||
1216 | public override void UnSubscribeEvents() | 1217 | public override void UnSubscribeEvents() |
1217 | { | 1218 | { |
1219 | CollisionEventsThisFrame.Clear(); | ||
1218 | _parent_scene.RemoveCollisionEventReporting(this); | 1220 | _parent_scene.RemoveCollisionEventReporting(this); |
1219 | m_requestedUpdateFrequency = 0; | 1221 | m_requestedUpdateFrequency = 0; |
1220 | m_eventsubscription = 0; | 1222 | m_eventsubscription = 0; |
@@ -1227,7 +1229,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1227 | // m_log.DebugFormat( | 1229 | // m_log.DebugFormat( |
1228 | // "[PHYSICS]: Adding collision event for {0}, collidedWith {1}, contact {2}", "", CollidedWith, contact); | 1230 | // "[PHYSICS]: Adding collision event for {0}, collidedWith {1}, contact {2}", "", CollidedWith, contact); |
1229 | 1231 | ||
1230 | CollisionEventsThisFrame.addCollider(CollidedWith, contact); | 1232 | CollisionEventsThisFrame.AddCollider(CollidedWith, contact); |
1231 | } | 1233 | } |
1232 | } | 1234 | } |
1233 | 1235 | ||
@@ -1235,11 +1237,9 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1235 | { | 1237 | { |
1236 | if (m_eventsubscription > m_requestedUpdateFrequency) | 1238 | if (m_eventsubscription > m_requestedUpdateFrequency) |
1237 | { | 1239 | { |
1238 | if (CollisionEventsThisFrame != null) | 1240 | base.SendCollisionUpdate(CollisionEventsThisFrame); |
1239 | { | 1241 | |
1240 | base.SendCollisionUpdate(CollisionEventsThisFrame); | 1242 | CollisionEventsThisFrame.Clear(); |
1241 | } | ||
1242 | CollisionEventsThisFrame = new CollisionEventUpdate(); | ||
1243 | m_eventsubscription = 0; | 1243 | m_eventsubscription = 0; |
1244 | } | 1244 | } |
1245 | } | 1245 | } |