diff options
author | UbitUmarov | 2016-08-17 22:34:21 +0100 |
---|---|---|
committer | UbitUmarov | 2016-08-17 22:34:21 +0100 |
commit | f1495cb237d23955a3bba32d9c6978bca4943026 (patch) | |
tree | 1b8249d73e03f9d3b121d4008b4af51a5553f5b1 /OpenSim/Region/PhysicsModules/ubOde/ODEPrim.cs | |
parent | remove some dead code (diff) | |
download | opensim-SC_OLD-f1495cb237d23955a3bba32d9c6978bca4943026.zip opensim-SC_OLD-f1495cb237d23955a3bba32d9c6978bca4943026.tar.gz opensim-SC_OLD-f1495cb237d23955a3bba32d9c6978bca4943026.tar.bz2 opensim-SC_OLD-f1495cb237d23955a3bba32d9c6978bca4943026.tar.xz |
ubOde reduce collision_start latency in same cases (only one collision happening and more than 50ms since last)
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() |