aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim/Region/Physics/OdePlugin/OdeScene.cs13
1 files changed, 4 insertions, 9 deletions
diff --git a/OpenSim/Region/Physics/OdePlugin/OdeScene.cs b/OpenSim/Region/Physics/OdePlugin/OdeScene.cs
index ace0ba5..55c7e5a 100644
--- a/OpenSim/Region/Physics/OdePlugin/OdeScene.cs
+++ b/OpenSim/Region/Physics/OdePlugin/OdeScene.cs
@@ -1229,14 +1229,12 @@ namespace OpenSim.Region.Physics.OdePlugin
1229 { 1229 {
1230 _perloopContact.Add(curContact); 1230 _perloopContact.Add(curContact);
1231 1231
1232 // If we're colliding against terrain
1233 if (name1 == "Terrain" || name2 == "Terrain") 1232 if (name1 == "Terrain" || name2 == "Terrain")
1234 { 1233 {
1235 // If we're moving
1236 if ((p2.PhysicsActorType == (int) ActorTypes.Agent) && 1234 if ((p2.PhysicsActorType == (int) ActorTypes.Agent) &&
1237 (Math.Abs(p2.Velocity.X) > 0.01f || Math.Abs(p2.Velocity.Y) > 0.01f)) 1235 (Math.Abs(p2.Velocity.X) > 0.01f || Math.Abs(p2.Velocity.Y) > 0.01f))
1238 { 1236 {
1239 // Use the movement terrain contact 1237 // Avatar is moving on terrain, use the movement terrain contact
1240 AvatarMovementTerrainContact.geom = curContact; 1238 AvatarMovementTerrainContact.geom = curContact;
1241 1239
1242 if (m_global_contactcount < maxContactsbeforedeath) 1240 if (m_global_contactcount < maxContactsbeforedeath)
@@ -1249,7 +1247,7 @@ namespace OpenSim.Region.Physics.OdePlugin
1249 { 1247 {
1250 if (p2.PhysicsActorType == (int)ActorTypes.Agent) 1248 if (p2.PhysicsActorType == (int)ActorTypes.Agent)
1251 { 1249 {
1252 // Use the non moving terrain contact 1250 // Avatar is standing on terrain, use the non moving terrain contact
1253 TerrainContact.geom = curContact; 1251 TerrainContact.geom = curContact;
1254 1252
1255 if (m_global_contactcount < maxContactsbeforedeath) 1253 if (m_global_contactcount < maxContactsbeforedeath)
@@ -1344,13 +1342,11 @@ namespace OpenSim.Region.Physics.OdePlugin
1344 } 1342 }
1345 else 1343 else
1346 { 1344 {
1347 // we're colliding with prim or avatar
1348 // check if we're moving
1349 if ((p2.PhysicsActorType == (int)ActorTypes.Agent)) 1345 if ((p2.PhysicsActorType == (int)ActorTypes.Agent))
1350 { 1346 {
1351 if ((Math.Abs(p2.Velocity.X) > 0.01f || Math.Abs(p2.Velocity.Y) > 0.01f)) 1347 if ((Math.Abs(p2.Velocity.X) > 0.01f || Math.Abs(p2.Velocity.Y) > 0.01f))
1352 { 1348 {
1353 // Use the Movement prim contact 1349 // Avatar is moving on a prim, use the Movement prim contact
1354 AvatarMovementprimContact.geom = curContact; 1350 AvatarMovementprimContact.geom = curContact;
1355 1351
1356 if (m_global_contactcount < maxContactsbeforedeath) 1352 if (m_global_contactcount < maxContactsbeforedeath)
@@ -1361,9 +1357,8 @@ namespace OpenSim.Region.Physics.OdePlugin
1361 } 1357 }
1362 else 1358 else
1363 { 1359 {
1364 // Use the non movement contact 1360 // Avatar is standing still on a prim, use the non movement contact
1365 contact.geom = curContact; 1361 contact.geom = curContact;
1366 _perloopContact.Add(curContact);
1367 1362
1368 if (m_global_contactcount < maxContactsbeforedeath) 1363 if (m_global_contactcount < maxContactsbeforedeath)
1369 { 1364 {