aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/UbitOdePlugin
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Physics/UbitOdePlugin')
-rw-r--r--OpenSim/Region/Physics/UbitOdePlugin/ODECharacter.cs1
-rw-r--r--OpenSim/Region/Physics/UbitOdePlugin/OdeScene.cs11
2 files changed, 11 insertions, 1 deletions
diff --git a/OpenSim/Region/Physics/UbitOdePlugin/ODECharacter.cs b/OpenSim/Region/Physics/UbitOdePlugin/ODECharacter.cs
index b0711d7..bfff3d4 100644
--- a/OpenSim/Region/Physics/UbitOdePlugin/ODECharacter.cs
+++ b/OpenSim/Region/Physics/UbitOdePlugin/ODECharacter.cs
@@ -903,6 +903,7 @@ namespace OpenSim.Region.Physics.OdePlugin
903 contact.SurfaceNormal.X = 0f; 903 contact.SurfaceNormal.X = 0f;
904 contact.SurfaceNormal.Y = 0f; 904 contact.SurfaceNormal.Y = 0f;
905 contact.SurfaceNormal.Z = -1f; 905 contact.SurfaceNormal.Z = -1f;
906 contact.RelativeSpeed = -vel.Z;
906 AddCollisionEvent(0, contact); 907 AddCollisionEvent(0, contact);
907 908
908 vec.Z *= 0.5f; 909 vec.Z *= 0.5f;
diff --git a/OpenSim/Region/Physics/UbitOdePlugin/OdeScene.cs b/OpenSim/Region/Physics/UbitOdePlugin/OdeScene.cs
index ddfdea4..11638d7 100644
--- a/OpenSim/Region/Physics/UbitOdePlugin/OdeScene.cs
+++ b/OpenSim/Region/Physics/UbitOdePlugin/OdeScene.cs
@@ -1064,7 +1064,7 @@ namespace OpenSim.Region.Physics.OdePlugin
1064 obj2LocalID = 0; 1064 obj2LocalID = 0;
1065 bool p1events = p1.SubscribedEvents(); 1065 bool p1events = p1.SubscribedEvents();
1066 bool p2events = p2.SubscribedEvents(); 1066 bool p2events = p2.SubscribedEvents();
1067 1067
1068 if (p1.IsVolumeDtc) 1068 if (p1.IsVolumeDtc)
1069 p2events = false; 1069 p2events = false;
1070 if (p2.IsVolumeDtc) 1070 if (p2.IsVolumeDtc)
@@ -1073,6 +1073,15 @@ namespace OpenSim.Region.Physics.OdePlugin
1073 if (!(p2events || p1events)) 1073 if (!(p2events || p1events))
1074 return; 1074 return;
1075 1075
1076 Vector3 vel = Vector3.Zero;
1077 if (p2 != null && p2.IsPhysical)
1078 vel = p2.Velocity;
1079
1080 if (p1 != null && p1.IsPhysical)
1081 vel -= p1.Velocity;
1082
1083 contact.RelativeSpeed = Vector3.Dot(vel, contact.SurfaceNormal);
1084
1076 switch ((ActorTypes)p1.PhysicsActorType) 1085 switch ((ActorTypes)p1.PhysicsActorType)
1077 { 1086 {
1078 case ActorTypes.Agent: 1087 case ActorTypes.Agent: