aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/UbitOdePlugin/OdeScene.cs
diff options
context:
space:
mode:
authorUbitUmarov2012-03-05 12:37:21 +0000
committerUbitUmarov2012-03-05 12:37:21 +0000
commit7377e633c73f7ee34240cb70f0f75fcd9b705168 (patch)
treed4f5e96224e6774da36525b5401a7ea3bb3961df /OpenSim/Region/Physics/UbitOdePlugin/OdeScene.cs
parentMerge branch 'master' of ssh://3dhosting.de/var/git/careminster into ubitwork (diff)
downloadopensim-SC-7377e633c73f7ee34240cb70f0f75fcd9b705168.zip
opensim-SC-7377e633c73f7ee34240cb70f0f75fcd9b705168.tar.gz
opensim-SC-7377e633c73f7ee34240cb70f0f75fcd9b705168.tar.bz2
opensim-SC-7377e633c73f7ee34240cb70f0f75fcd9b705168.tar.xz
update ubitOde
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Physics/UbitOdePlugin/OdeScene.cs15
1 files changed, 10 insertions, 5 deletions
diff --git a/OpenSim/Region/Physics/UbitOdePlugin/OdeScene.cs b/OpenSim/Region/Physics/UbitOdePlugin/OdeScene.cs
index 884a5a7..14516f9 100644
--- a/OpenSim/Region/Physics/UbitOdePlugin/OdeScene.cs
+++ b/OpenSim/Region/Physics/UbitOdePlugin/OdeScene.cs
@@ -693,8 +693,8 @@ namespace OpenSim.Region.Physics.OdePlugin
693 // big messy collision analises 693 // big messy collision analises
694 float mu = 0; 694 float mu = 0;
695 float bounce = 0; 695 float bounce = 0;
696 ContactData contactdata1 = new ContactData(0, 0); 696 ContactData contactdata1 = new ContactData(0, 0, false);
697 ContactData contactdata2 = new ContactData(0, 0); 697 ContactData contactdata2 = new ContactData(0, 0, false);
698 bool erpSoft = false; 698 bool erpSoft = false;
699 699
700 String name = null; 700 String name = null;
@@ -718,6 +718,7 @@ namespace OpenSim.Region.Physics.OdePlugin
718 if ((Math.Abs(p2.Velocity.X - p1.Velocity.X) > 0.1f || Math.Abs(p2.Velocity.Y - p1.Velocity.Y) > 0.1f)) 718 if ((Math.Abs(p2.Velocity.X - p1.Velocity.X) > 0.1f || Math.Abs(p2.Velocity.Y - p1.Velocity.Y) > 0.1f))
719 mu *= frictionMovementMult; 719 mu *= frictionMovementMult;
720 720
721 erpSoft = contactdata1.softcolide | contactdata2.softcolide;
721 p1.CollidingObj = true; 722 p1.CollidingObj = true;
722 p2.CollidingObj = true; 723 p2.CollidingObj = true;
723 break; 724 break;
@@ -732,6 +733,9 @@ namespace OpenSim.Region.Physics.OdePlugin
732 mu *= frictionMovementMult; 733 mu *= frictionMovementMult;
733 if (p2.Velocity.LengthSquared() > 0.0f) 734 if (p2.Velocity.LengthSquared() > 0.0f)
734 p2.CollidingObj = true; 735 p2.CollidingObj = true;
736
737 erpSoft = contactdata1.softcolide | contactdata2.softcolide;
738
735 dop1foot = true; 739 dop1foot = true;
736 break; 740 break;
737 default: 741 default:
@@ -753,6 +757,7 @@ namespace OpenSim.Region.Physics.OdePlugin
753 if ((Math.Abs(p2.Velocity.X - p1.Velocity.X) > 0.1f || Math.Abs(p2.Velocity.Y - p1.Velocity.Y) > 0.1f)) 757 if ((Math.Abs(p2.Velocity.X - p1.Velocity.X) > 0.1f || Math.Abs(p2.Velocity.Y - p1.Velocity.Y) > 0.1f))
754 mu *= frictionMovementMult; 758 mu *= frictionMovementMult;
755 759
760 erpSoft = contactdata1.softcolide | contactdata2.softcolide;
756 dop2foot = true; 761 dop2foot = true;
757 if (p1.Velocity.LengthSquared() > 0.0f) 762 if (p1.Velocity.LengthSquared() > 0.0f)
758 p1.CollidingObj = true; 763 p1.CollidingObj = true;
@@ -766,7 +771,7 @@ namespace OpenSim.Region.Physics.OdePlugin
766 p1.getContactData(ref contactdata1); 771 p1.getContactData(ref contactdata1);
767 p2.getContactData(ref contactdata2); 772 p2.getContactData(ref contactdata2);
768 bounce = contactdata1.bounce * contactdata2.bounce; 773 bounce = contactdata1.bounce * contactdata2.bounce;
769 erpSoft = true; 774 erpSoft = contactdata1.softcolide | contactdata2.softcolide;
770 mu = (float)Math.Sqrt(contactdata1.mu * contactdata2.mu); 775 mu = (float)Math.Sqrt(contactdata1.mu * contactdata2.mu);
771 776
772 if ((Math.Abs(p2.Velocity.X - p1.Velocity.X) > 0.1f || Math.Abs(p2.Velocity.Y - p1.Velocity.Y) > 0.1f)) 777 if ((Math.Abs(p2.Velocity.X - p1.Velocity.X) > 0.1f || Math.Abs(p2.Velocity.Y - p1.Velocity.Y) > 0.1f))
@@ -778,12 +783,12 @@ namespace OpenSim.Region.Physics.OdePlugin
778 { 783 {
779 if (name == "Terrain") 784 if (name == "Terrain")
780 { 785 {
781 erpSoft = true;
782 p1.getContactData(ref contactdata1); 786 p1.getContactData(ref contactdata1);
783 bounce = contactdata1.bounce * TerrainBounce; 787 bounce = contactdata1.bounce * TerrainBounce;
784 mu = (float)Math.Sqrt(contactdata1.mu * TerrainFriction); 788 mu = (float)Math.Sqrt(contactdata1.mu * TerrainFriction);
785 if (Math.Abs(p1.Velocity.X) > 0.1f || Math.Abs(p1.Velocity.Y) > 0.1f) 789 if (Math.Abs(p1.Velocity.X) > 0.1f || Math.Abs(p1.Velocity.Y) > 0.1f)
786 mu *= frictionMovementMult; 790 mu *= frictionMovementMult;
791 erpSoft = contactdata1.softcolide;
787 p1.CollidingGround = true; 792 p1.CollidingGround = true;
788 } 793 }
789 else if (name == "Water") 794 else if (name == "Water")
@@ -804,11 +809,11 @@ namespace OpenSim.Region.Physics.OdePlugin
804 { 809 {
805 if (p2.PhysicsActorType == (int)ActorTypes.Prim) 810 if (p2.PhysicsActorType == (int)ActorTypes.Prim)
806 { 811 {
807 erpSoft = true;
808 p2.CollidingGround = true; 812 p2.CollidingGround = true;
809 p2.getContactData(ref contactdata2); 813 p2.getContactData(ref contactdata2);
810 bounce = contactdata2.bounce * TerrainBounce; 814 bounce = contactdata2.bounce * TerrainBounce;
811 mu = (float)Math.Sqrt(contactdata2.mu * TerrainFriction); 815 mu = (float)Math.Sqrt(contactdata2.mu * TerrainFriction);
816 erpSoft = contactdata2.softcolide;
812 817
813 if (Math.Abs(p2.Velocity.X) > 0.1f || Math.Abs(p2.Velocity.Y) > 0.1f) 818 if (Math.Abs(p2.Velocity.X) > 0.1f || Math.Abs(p2.Velocity.Y) > 0.1f)
814 mu *= frictionMovementMult; 819 mu *= frictionMovementMult;