aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorCharles Krinke2008-11-01 17:58:34 +0000
committerCharles Krinke2008-11-01 17:58:34 +0000
commit9299be0080add077ecec9fc869f43565c4481e88 (patch)
tree7a656be483b73dbddbc8bb3060b686c1b1a6bc74
parentAdded soft_cfm and soft_erp to the general "contact" initialization (diff)
downloadopensim-SC_OLD-9299be0080add077ecec9fc869f43565c4481e88.zip
opensim-SC_OLD-9299be0080add077ecec9fc869f43565c4481e88.tar.gz
opensim-SC_OLD-9299be0080add077ecec9fc869f43565c4481e88.tar.bz2
opensim-SC_OLD-9299be0080add077ecec9fc869f43565c4481e88.tar.xz
Revert last checkin. Avatars fall through non-physical prims now.
There is more to the solution then just enabling soft_erp and soft_cfm for all d.Contact cases.
-rw-r--r--OpenSim/Region/Physics/OdePlugin/OdePlugin.cs19
1 files changed, 7 insertions, 12 deletions
diff --git a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs
index 486f53c..a782e2d 100644
--- a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs
+++ b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs
@@ -386,12 +386,9 @@ namespace OpenSim.Region.Physics.OdePlugin
386 386
387 staticPrimspace = new IntPtr[(int)(300 / metersInSpace), (int)(300 / metersInSpace)]; 387 staticPrimspace = new IntPtr[(int)(300 / metersInSpace), (int)(300 / metersInSpace)];
388 388
389 // General contact friction, bounce and other parameters 389 // Centeral contact friction and bounce
390 contact.surface.mode |= (d.ContactFlags.SoftERP | d.ContactFlags.SoftCFM);
391 contact.surface.mu = nmAvatarObjectContactFriction; 390 contact.surface.mu = nmAvatarObjectContactFriction;
392 contact.surface.bounce = nmAvatarObjectContactBounce; 391 contact.surface.bounce = nmAvatarObjectContactBounce;
393 contact.surface.soft_cfm = 0.01f; //ckrinke 11-08
394 contact.surface.soft_erp = 0.010f; //ckrinke 11-08
395 392
396 // Terrain contact friction and Bounce 393 // Terrain contact friction and Bounce
397 // This is the *non* moving version. Use this when an avatar 394 // This is the *non* moving version. Use this when an avatar
@@ -401,6 +398,12 @@ namespace OpenSim.Region.Physics.OdePlugin
401 TerrainContact.surface.bounce = nmTerrainContactBounce; 398 TerrainContact.surface.bounce = nmTerrainContactBounce;
402 TerrainContact.surface.soft_erp = nmTerrainContactERP; 399 TerrainContact.surface.soft_erp = nmTerrainContactERP;
403 400
401 WaterContact.surface.mode |= (d.ContactFlags.SoftERP | d.ContactFlags.SoftCFM);
402 WaterContact.surface.mu = 0f; // No friction
403 WaterContact.surface.bounce = 0.0f; // No bounce
404 WaterContact.surface.soft_cfm = 0.01f;
405 WaterContact.surface.soft_erp = 0.010f;
406
404 // Prim contact friction and bounce 407 // Prim contact friction and bounce
405 // THis is the *non* moving version of friction and bounce 408 // THis is the *non* moving version of friction and bounce
406 // Use this when an avatar comes in contact with a prim 409 // Use this when an avatar comes in contact with a prim
@@ -415,14 +418,6 @@ namespace OpenSim.Region.Physics.OdePlugin
415 AvatarMovementTerrainContact.surface.bounce = mTerrainContactBounce; 418 AvatarMovementTerrainContact.surface.bounce = mTerrainContactBounce;
416 AvatarMovementTerrainContact.surface.soft_erp = mTerrainContactERP; 419 AvatarMovementTerrainContact.surface.soft_erp = mTerrainContactERP;
417 420
418 // And finally, WaterContact parameters. These are the five different d.Contact defined
419 // currently (11-08)
420 WaterContact.surface.mode |= (d.ContactFlags.SoftERP | d.ContactFlags.SoftCFM);
421 WaterContact.surface.mu = 0f; // No friction
422 WaterContact.surface.bounce = 0.0f; // No bounce
423 WaterContact.surface.soft_cfm = 0.01f;
424 WaterContact.surface.soft_erp = 0.010f;
425
426 d.HashSpaceSetLevels(space, worldHashspaceLow, worldHashspaceHigh); 421 d.HashSpaceSetLevels(space, worldHashspaceLow, worldHashspaceHigh);
427 422
428 // Set the gravity,, don't disable things automatically (we set it explicitly on some things) 423 // Set the gravity,, don't disable things automatically (we set it explicitly on some things)