diff options
author | Melanie Thielker | 2014-10-12 19:45:46 +0200 |
---|---|---|
committer | Melanie Thielker | 2014-10-12 19:45:46 +0200 |
commit | 47fdd7f91a8381b334c895051051a4747aef5ba5 (patch) | |
tree | ad277283820ab89fc4120afbdf26e83cf97e8246 | |
parent | Merge branch 'ubitworkmaster' (diff) | |
parent | move AnimationSet and AvatarSkeleton to OpenSimExtras (diff) | |
download | opensim-SC_OLD-47fdd7f91a8381b334c895051051a4747aef5ba5.zip opensim-SC_OLD-47fdd7f91a8381b334c895051051a4747aef5ba5.tar.gz opensim-SC_OLD-47fdd7f91a8381b334c895051051a4747aef5ba5.tar.bz2 opensim-SC_OLD-47fdd7f91a8381b334c895051051a4747aef5ba5.tar.xz |
Merge branch 'ubitworkmaster'
-rw-r--r-- | OpenSim/Region/ClientStack/Linden/Caps/SimulatorFeaturesModule.cs | 12 | ||||
-rw-r--r-- | OpenSim/Region/Physics/UbitOdePlugin/ODECharacter.cs | 44 |
2 files changed, 26 insertions, 30 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/SimulatorFeaturesModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/SimulatorFeaturesModule.cs index 7c22a7c..bedec80 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/SimulatorFeaturesModule.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/SimulatorFeaturesModule.cs | |||
@@ -131,8 +131,6 @@ namespace OpenSim.Region.ClientStack.Linden | |||
131 | m_features["MeshRezEnabled"] = true; | 131 | m_features["MeshRezEnabled"] = true; |
132 | m_features["MeshUploadEnabled"] = true; | 132 | m_features["MeshUploadEnabled"] = true; |
133 | m_features["MeshXferEnabled"] = true; | 133 | m_features["MeshXferEnabled"] = true; |
134 | m_features["AvatarSkeleton"] = true; | ||
135 | m_features["AnimationSet"] = true; | ||
136 | 134 | ||
137 | m_features["PhysicsMaterialsEnabled"] = true; | 135 | m_features["PhysicsMaterialsEnabled"] = true; |
138 | 136 | ||
@@ -143,15 +141,19 @@ namespace OpenSim.Region.ClientStack.Linden | |||
143 | m_features["PhysicsShapeTypes"] = typesMap; | 141 | m_features["PhysicsShapeTypes"] = typesMap; |
144 | 142 | ||
145 | // Extra information for viewers that want to use it | 143 | // Extra information for viewers that want to use it |
146 | // TODO: Take these out of here into their respective modules, like map-server-url | 144 | |
147 | OSDMap extrasMap = new OSDMap(); | 145 | OSDMap extrasMap = new OSDMap(); |
146 | |||
147 | extrasMap["AvatarSkeleton"] = true; | ||
148 | extrasMap["AnimationSet"] = true; | ||
149 | |||
150 | // TODO: Take these out of here into their respective modules, like map-server-url | ||
148 | if (m_SearchURL != string.Empty) | 151 | if (m_SearchURL != string.Empty) |
149 | extrasMap["search-server-url"] = m_SearchURL; | 152 | extrasMap["search-server-url"] = m_SearchURL; |
150 | if (m_ExportSupported) | 153 | if (m_ExportSupported) |
151 | extrasMap["ExportSupported"] = true; | 154 | extrasMap["ExportSupported"] = true; |
152 | 155 | ||
153 | if (extrasMap.Count > 0) | 156 | m_features["OpenSimExtras"] = extrasMap; |
154 | m_features["OpenSimExtras"] = extrasMap; | ||
155 | 157 | ||
156 | } | 158 | } |
157 | } | 159 | } |
diff --git a/OpenSim/Region/Physics/UbitOdePlugin/ODECharacter.cs b/OpenSim/Region/Physics/UbitOdePlugin/ODECharacter.cs index af7ca1d..1c38246 100644 --- a/OpenSim/Region/Physics/UbitOdePlugin/ODECharacter.cs +++ b/OpenSim/Region/Physics/UbitOdePlugin/ODECharacter.cs | |||
@@ -311,9 +311,9 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
311 | { | 311 | { |
312 | if (value) | 312 | if (value) |
313 | { | 313 | { |
314 | m_colliderfilter += 2; | 314 | m_colliderfilter += 3; |
315 | if (m_colliderfilter > 2) | 315 | if (m_colliderfilter > 3) |
316 | m_colliderfilter = 2; | 316 | m_colliderfilter = 3; |
317 | } | 317 | } |
318 | else | 318 | else |
319 | { | 319 | { |
@@ -328,6 +328,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
328 | { | 328 | { |
329 | m_pidControllerActive = true; | 329 | m_pidControllerActive = true; |
330 | m_iscolliding = true; | 330 | m_iscolliding = true; |
331 | m_freemove = false; | ||
331 | } | 332 | } |
332 | } | 333 | } |
333 | } | 334 | } |
@@ -928,19 +929,6 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
928 | IsColliding = true; | 929 | IsColliding = true; |
929 | } | 930 | } |
930 | } | 931 | } |
931 | /* | ||
932 | if (contact.normal.Z < 0.2f) | ||
933 | { | ||
934 | contact.normal.Z = 0; | ||
935 | float t = contact.normal.X * contact.normal.X + contact.normal.Y * contact.normal.Y; | ||
936 | if (t > 0) | ||
937 | { | ||
938 | t = 1.0f / t; | ||
939 | contact.normal.X *= t; | ||
940 | contact.normal.Y *= t; | ||
941 | } | ||
942 | } | ||
943 | */ | ||
944 | return true; | 932 | return true; |
945 | } | 933 | } |
946 | 934 | ||
@@ -1204,12 +1192,18 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1204 | // Avatar to Avatar collisions | 1192 | // Avatar to Avatar collisions |
1205 | // Prim to avatar collisions | 1193 | // Prim to avatar collisions |
1206 | 1194 | ||
1207 | vec.X = -vel.X * PID_D + (_zeroPosition.X - localpos.X) * (PID_P * 5); | 1195 | vec.X = -vel.X * PID_D * 2f + (_zeroPosition.X - localpos.X) * (PID_P * 5); |
1208 | vec.Y = -vel.Y * PID_D + (_zeroPosition.Y - localpos.Y) * (PID_P * 5); | 1196 | vec.Y = -vel.Y * PID_D * 2f + (_zeroPosition.Y - localpos.Y) * (PID_P * 5); |
1197 | if(vel.Z > 0) | ||
1198 | vec.Z += -vel.Z * PID_D + (_zeroPosition.Z - localpos.Z) * PID_P; | ||
1199 | else | ||
1200 | vec.Z += (-vel.Z * PID_D + (_zeroPosition.Z - localpos.Z) * PID_P) * 0.2f; | ||
1201 | /* | ||
1209 | if (flying) | 1202 | if (flying) |
1210 | { | 1203 | { |
1211 | vec.Z += -vel.Z * PID_D + (_zeroPosition.Z - localpos.Z) * PID_P; | 1204 | vec.Z += -vel.Z * PID_D + (_zeroPosition.Z - localpos.Z) * PID_P; |
1212 | } | 1205 | } |
1206 | */ | ||
1213 | } | 1207 | } |
1214 | //PidStatus = true; | 1208 | //PidStatus = true; |
1215 | } | 1209 | } |
@@ -1226,7 +1220,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1226 | if (ctz.Z > 0f) | 1220 | if (ctz.Z > 0f) |
1227 | { | 1221 | { |
1228 | // moving up or JUMPING | 1222 | // moving up or JUMPING |
1229 | vec.Z += (ctz.Z - vel.Z) * PID_D; | 1223 | vec.Z += (ctz.Z - vel.Z) * PID_D * 2f; |
1230 | vec.X += (ctz.X - vel.X) * (PID_D); | 1224 | vec.X += (ctz.X - vel.X) * (PID_D); |
1231 | vec.Y += (ctz.Y - vel.Y) * (PID_D); | 1225 | vec.Y += (ctz.Y - vel.Y) * (PID_D); |
1232 | } | 1226 | } |
@@ -1236,7 +1230,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1236 | if (ctz.Z == 0) | 1230 | if (ctz.Z == 0) |
1237 | { | 1231 | { |
1238 | if (vel.Z > 0) | 1232 | if (vel.Z > 0) |
1239 | vec.Z -= vel.Z * PID_D; | 1233 | vec.Z -= vel.Z * PID_D * 2f; |
1240 | vec.X += (ctz.X - vel.X) * (PID_D); | 1234 | vec.X += (ctz.X - vel.X) * (PID_D); |
1241 | vec.Y += (ctz.Y - vel.Y) * (PID_D); | 1235 | vec.Y += (ctz.Y - vel.Y) * (PID_D); |
1242 | } | 1236 | } |
@@ -1305,9 +1299,9 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1305 | vec.X -= breakfactor * vel.X; | 1299 | vec.X -= breakfactor * vel.X; |
1306 | vec.Y -= breakfactor * vel.Y; | 1300 | vec.Y -= breakfactor * vel.Y; |
1307 | if (flying) | 1301 | if (flying) |
1308 | vec.Z -= breakfactor * vel.Z; | 1302 | vec.Z -= 0.5f * breakfactor * vel.Z; |
1309 | else | 1303 | else |
1310 | vec.Z -= .5f* m_mass * vel.Z; | 1304 | vec.Z -= .16f* m_mass * vel.Z; |
1311 | } | 1305 | } |
1312 | 1306 | ||
1313 | if (flying) | 1307 | if (flying) |
@@ -1687,9 +1681,9 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1687 | _zeroFlag = false; | 1681 | _zeroFlag = false; |
1688 | _target_velocity = Vector3.Zero; | 1682 | _target_velocity = Vector3.Zero; |
1689 | m_freemove = true; | 1683 | m_freemove = true; |
1690 | m_colliderfilter = -2; | 1684 | m_colliderfilter = -1; |
1691 | m_colliderObjectfilter = -2; | 1685 | m_colliderObjectfilter = -1; |
1692 | m_colliderGroundfilter = -2; | 1686 | m_colliderGroundfilter = -1; |
1693 | 1687 | ||
1694 | m_iscolliding = false; | 1688 | m_iscolliding = false; |
1695 | m_iscollidingGround = false; | 1689 | m_iscollidingGround = false; |