diff options
author | John Hurliman | 2009-10-28 12:20:34 -0700 |
---|---|---|
committer | John Hurliman | 2009-10-28 12:20:34 -0700 |
commit | ee0f7e10c83a38b455fe5729113c6ea7576f4963 (patch) | |
tree | 60ccd0e0e4ef1678ed8a63383c4a38964c17436b | |
parent | Track timestamps when terse updates were last sent for a prim or avatar to av... (diff) | |
download | opensim-SC_OLD-ee0f7e10c83a38b455fe5729113c6ea7576f4963.zip opensim-SC_OLD-ee0f7e10c83a38b455fe5729113c6ea7576f4963.tar.gz opensim-SC_OLD-ee0f7e10c83a38b455fe5729113c6ea7576f4963.tar.bz2 opensim-SC_OLD-ee0f7e10c83a38b455fe5729113c6ea7576f4963.tar.xz |
Fixed a bad check on velocity in the ODE near() callback (it was only checking for velocity in certain directions, and was calling the get_Velocity() function three times)
-rw-r--r-- | OpenSim/Region/Physics/OdePlugin/OdePlugin.cs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs index 9e36020..8382233 100644 --- a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs +++ b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs | |||
@@ -772,7 +772,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
772 | 772 | ||
773 | lock (contacts) | 773 | lock (contacts) |
774 | { | 774 | { |
775 | count = d.Collide(g1, g2, contacts.GetLength(0), contacts, d.ContactGeom.SizeOf); | 775 | count = d.Collide(g1, g2, contacts.Length, contacts, d.ContactGeom.SizeOf); |
776 | } | 776 | } |
777 | } | 777 | } |
778 | catch (SEHException) | 778 | catch (SEHException) |
@@ -830,7 +830,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
830 | p2.CollidingObj = true; | 830 | p2.CollidingObj = true; |
831 | break; | 831 | break; |
832 | case (int)ActorTypes.Prim: | 832 | case (int)ActorTypes.Prim: |
833 | if (p2.Velocity.X > 0 || p2.Velocity.Y > 0 || p2.Velocity.Z > 0) | 833 | if (p2.Velocity.LengthSquared() > 0.0f) |
834 | p2.CollidingObj = true; | 834 | p2.CollidingObj = true; |
835 | break; | 835 | break; |
836 | case (int)ActorTypes.Unknown: | 836 | case (int)ActorTypes.Unknown: |
@@ -1014,7 +1014,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1014 | if (!skipThisContact && checkDupe(contacts[i], p2.PhysicsActorType)) | 1014 | if (!skipThisContact && checkDupe(contacts[i], p2.PhysicsActorType)) |
1015 | skipThisContact = true; | 1015 | skipThisContact = true; |
1016 | 1016 | ||
1017 | int maxContactsbeforedeath = 4000; | 1017 | const int maxContactsbeforedeath = 4000; |
1018 | joint = IntPtr.Zero; | 1018 | joint = IntPtr.Zero; |
1019 | 1019 | ||
1020 | 1020 | ||