aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorUbitUmarov2012-05-21 12:35:17 +0100
committerUbitUmarov2012-05-21 12:35:17 +0100
commit85f578999320ab4b3b87d99c6901e7dfc86f8cc3 (patch)
treea208de009fde1bf3ef6264bde29e562bb8847a53 /OpenSim/Region
parent missing update script events call (diff)
downloadopensim-SC_OLD-85f578999320ab4b3b87d99c6901e7dfc86f8cc3.zip
opensim-SC_OLD-85f578999320ab4b3b87d99c6901e7dfc86f8cc3.tar.gz
opensim-SC_OLD-85f578999320ab4b3b87d99c6901e7dfc86f8cc3.tar.bz2
opensim-SC_OLD-85f578999320ab4b3b87d99c6901e7dfc86f8cc3.tar.xz
try to let avas climb higher steps. Will only work in some cases, may have bad effects, so needs some more testing
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/Physics/UbitOdePlugin/ODEPrim.cs2
-rw-r--r--OpenSim/Region/Physics/UbitOdePlugin/OdeScene.cs82
2 files changed, 75 insertions, 9 deletions
diff --git a/OpenSim/Region/Physics/UbitOdePlugin/ODEPrim.cs b/OpenSim/Region/Physics/UbitOdePlugin/ODEPrim.cs
index 62fd279..459cd27 100644
--- a/OpenSim/Region/Physics/UbitOdePlugin/ODEPrim.cs
+++ b/OpenSim/Region/Physics/UbitOdePlugin/ODEPrim.cs
@@ -2562,10 +2562,10 @@ namespace OpenSim.Region.Physics.OdePlugin
2562 { 2562 {
2563 d.Quaternion qtmp; 2563 d.Quaternion qtmp;
2564 d.GeomCopyQuaternion(prim_geom, out qtmp); 2564 d.GeomCopyQuaternion(prim_geom, out qtmp);
2565 _orientation.W = qtmp.W;
2566 _orientation.X = qtmp.X; 2565 _orientation.X = qtmp.X;
2567 _orientation.Y = qtmp.Y; 2566 _orientation.Y = qtmp.Y;
2568 _orientation.Z = qtmp.Z; 2567 _orientation.Z = qtmp.Z;
2568 _orientation.W = qtmp.W;
2569 2569
2570 d.Vector3 lpos = d.GeomGetPosition(prim_geom); 2570 d.Vector3 lpos = d.GeomGetPosition(prim_geom);
2571 _position.X = lpos.X; 2571 _position.X = lpos.X;
diff --git a/OpenSim/Region/Physics/UbitOdePlugin/OdeScene.cs b/OpenSim/Region/Physics/UbitOdePlugin/OdeScene.cs
index bfcfd21..d5968fc 100644
--- a/OpenSim/Region/Physics/UbitOdePlugin/OdeScene.cs
+++ b/OpenSim/Region/Physics/UbitOdePlugin/OdeScene.cs
@@ -1006,16 +1006,82 @@ namespace OpenSim.Region.Physics.OdePlugin
1006 else 1006 else
1007 1007
1008 { 1008 {
1009 if (dop1foot && (p1.Position.Z - curContact.pos.Z) > (p1.Size.Z - avCapRadius) * 0.5f)
1010 p1.IsColliding = true;
1011 if (dop2foot && (p2.Position.Z - curContact.pos.Z) > (p2.Size.Z - avCapRadius) * 0.5f)
1012 p2.IsColliding = true;
1013 1009
1014 if (AvanormOverride && curContact.depth > 0.3f) 1010 if (AvanormOverride)
1015 { 1011 {
1016 curContact.normal.X = normoverride.X; 1012 if (curContact.depth > 0.3f)
1017 curContact.normal.Y = normoverride.Y; 1013 {
1018 curContact.normal.Z = normoverride.Z; 1014 if (dop1foot && (p1.Position.Z - curContact.pos.Z) > (p1.Size.Z - avCapRadius) * 0.5f)
1015 p1.IsColliding = true;
1016 if (dop2foot && (p2.Position.Z - curContact.pos.Z) > (p2.Size.Z - avCapRadius) * 0.5f)
1017 p2.IsColliding = true;
1018 curContact.normal.X = normoverride.X;
1019 curContact.normal.Y = normoverride.Y;
1020 curContact.normal.Z = normoverride.Z;
1021 }
1022
1023 else
1024 {
1025 if (dop1foot)
1026 {
1027 float sz = p1.Size.Z;
1028 Vector3 vtmp = p1.Position;
1029 float ppos = curContact.pos.Z - vtmp.Z + (sz - avCapRadius) * 0.5f;
1030 if (ppos > 0f)
1031 {
1032 if (!p1.Flying)
1033 {
1034 d.AABB aabb;
1035 d.GeomGetAABB(g2, out aabb);
1036 float tmp = vtmp.Z - sz * .25f;
1037
1038 if (aabb.MaxZ < tmp)
1039 {
1040 vtmp.X = curContact.pos.X - vtmp.X;
1041 vtmp.Y = curContact.pos.Y - vtmp.Y;
1042 vtmp.Z = -0.2f;
1043 vtmp.Normalize();
1044 curContact.normal.X = vtmp.X;
1045 curContact.normal.Y = vtmp.Y;
1046 curContact.normal.Z = vtmp.Z;
1047 }
1048 }
1049 }
1050 else
1051 p1.IsColliding = true;
1052
1053 }
1054
1055 if (dop2foot)
1056 {
1057 float sz = p2.Size.Z;
1058 Vector3 vtmp = p2.Position;
1059 float ppos = curContact.pos.Z - vtmp.Z + (sz - avCapRadius) * 0.5f;
1060 if (ppos > 0f)
1061 {
1062 if (!p2.Flying)
1063 {
1064 d.AABB aabb;
1065 d.GeomGetAABB(g1, out aabb);
1066 float tmp = vtmp.Z - sz * .25f;
1067
1068 if (aabb.MaxZ < tmp)
1069 {
1070 vtmp.X = curContact.pos.X - vtmp.X;
1071 vtmp.Y = curContact.pos.Y - vtmp.Y;
1072 vtmp.Z = -0.2f;
1073 vtmp.Normalize();
1074 curContact.normal.X = vtmp.X;
1075 curContact.normal.Y = vtmp.Y;
1076 curContact.normal.Z = vtmp.Z;
1077 }
1078 }
1079 }
1080 else
1081 p2.IsColliding = true;
1082
1083 }
1084 }
1019 } 1085 }
1020 1086
1021 Joint = CreateContacJoint(ref curContact, mu, bounce, cfm, erpscale, dscale); 1087 Joint = CreateContacJoint(ref curContact, mu, bounce, cfm, erpscale, dscale);