diff options
author | UbitUmarov | 2017-07-03 22:47:27 +0100 |
---|---|---|
committer | UbitUmarov | 2017-07-03 22:47:27 +0100 |
commit | 39751891f49afb07d57fadd3002655b498698e31 (patch) | |
tree | 4cde73cc2b2d2b5ac9d4376f933be0f0c4c848ab /OpenSim/Region/PhysicsModules/ubOde/ODECharacter.cs | |
parent | update ode.dll ( windows) (diff) | |
download | opensim-SC_OLD-39751891f49afb07d57fadd3002655b498698e31.zip opensim-SC_OLD-39751891f49afb07d57fadd3002655b498698e31.tar.gz opensim-SC_OLD-39751891f49afb07d57fadd3002655b498698e31.tar.bz2 opensim-SC_OLD-39751891f49afb07d57fadd3002655b498698e31.tar.xz |
ubOde: dont do avatar step climb on small true spheres. lets play simple football
Diffstat (limited to 'OpenSim/Region/PhysicsModules/ubOde/ODECharacter.cs')
-rw-r--r-- | OpenSim/Region/PhysicsModules/ubOde/ODECharacter.cs | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/OpenSim/Region/PhysicsModules/ubOde/ODECharacter.cs b/OpenSim/Region/PhysicsModules/ubOde/ODECharacter.cs index 6016530..3c4675c 100644 --- a/OpenSim/Region/PhysicsModules/ubOde/ODECharacter.cs +++ b/OpenSim/Region/PhysicsModules/ubOde/ODECharacter.cs | |||
@@ -944,6 +944,12 @@ namespace OpenSim.Region.PhysicsModule.ubOde | |||
944 | return true; | 944 | return true; |
945 | } | 945 | } |
946 | 946 | ||
947 | if (gtype == d.GeomClassID.SphereClass) | ||
948 | { | ||
949 | if(d.GeomSphereGetRadius(other) < 0.5) | ||
950 | return true; | ||
951 | } | ||
952 | |||
947 | if (offset.Z > 0 || contact.normal.Z > 0.35f) | 953 | if (offset.Z > 0 || contact.normal.Z > 0.35f) |
948 | { | 954 | { |
949 | if (offset.Z <= 0) | 955 | if (offset.Z <= 0) |
@@ -980,12 +986,12 @@ namespace OpenSim.Region.PhysicsModule.ubOde | |||
980 | offset.Normalize(); | 986 | offset.Normalize(); |
981 | 987 | ||
982 | float tdp = contact.depth; | 988 | float tdp = contact.depth; |
983 | float t = contact.normal.Z * contact.normal.Z; | 989 | float t = offset.X; |
984 | t = Math.Abs(t); | 990 | t = Math.Abs(t); |
985 | if(t > 1e-6) | 991 | if(t > 1e-6) |
986 | { | 992 | { |
987 | tdp /= t; | 993 | tdp /= t; |
988 | tdp *= offset.Z * offset.Z; | 994 | tdp *= contact.normal.X; |
989 | } | 995 | } |
990 | else | 996 | else |
991 | tdp *= 10; | 997 | tdp *= 10; |