diff options
Diffstat (limited to 'OpenSim')
4 files changed, 13 insertions, 4 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSConstraint.cs b/OpenSim/Region/Physics/BulletSPlugin/BSConstraint.cs index d9270d1..2e15ced 100755 --- a/OpenSim/Region/Physics/BulletSPlugin/BSConstraint.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSConstraint.cs | |||
@@ -98,6 +98,10 @@ public abstract class BSConstraint : IDisposable | |||
98 | { | 98 | { |
99 | // m_world.scene.PhysicsLogging.Write("{0},BSConstraint.RecomputeConstraintVariables,taint,enabling,A={1},B={2}", | 99 | // m_world.scene.PhysicsLogging.Write("{0},BSConstraint.RecomputeConstraintVariables,taint,enabling,A={1},B={2}", |
100 | // BSScene.DetailLogZero, Body1.ID, Body2.ID); | 100 | // BSScene.DetailLogZero, Body1.ID, Body2.ID); |
101 | |||
102 | // Setting an object's mass to zero (making it static like when it's selected) | ||
103 | // automatically disables the constraints. | ||
104 | // If enabled, be sure to set the constraint itself to enabled. | ||
101 | BulletSimAPI.SetConstraintEnable2(m_constraint.Ptr, m_world.scene.NumericBool(true)); | 105 | BulletSimAPI.SetConstraintEnable2(m_constraint.Ptr, m_world.scene.NumericBool(true)); |
102 | } | 106 | } |
103 | else | 107 | else |
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSLinkset.cs b/OpenSim/Region/Physics/BulletSPlugin/BSLinkset.cs index b04e1b6..3111258 100755 --- a/OpenSim/Region/Physics/BulletSPlugin/BSLinkset.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSLinkset.cs | |||
@@ -245,8 +245,8 @@ public class BSLinkset | |||
245 | // their constraints have not been created yet. | 245 | // their constraints have not been created yet. |
246 | // Caused by the fact that m_children is built at run time but building constraints | 246 | // Caused by the fact that m_children is built at run time but building constraints |
247 | // happens at taint time. | 247 | // happens at taint time. |
248 | // m_physicsScene.Logger.ErrorFormat("[BULLETSIM LINKSET] RecomputeLinksetConstraintVariables: constraint not found for root={0}, child={1}", | 248 | // m_physicsScene.Logger.ErrorFormat("{0} RecomputeLinksetConstraintVariables: constraint not found for root={1}, child={2}", |
249 | // m_linksetRoot.Body.ID, child.Body.ID); | 249 | // LogHeader, m_linksetRoot.Body.ID, child.Body.ID); |
250 | } | 250 | } |
251 | } | 251 | } |
252 | } | 252 | } |
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs b/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs index de182f8..01f231b 100644 --- a/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs | |||
@@ -472,6 +472,10 @@ public sealed class BSPrim : BSPhysObject | |||
472 | 472 | ||
473 | // Make gravity work if the object is physical and not selected | 473 | // Make gravity work if the object is physical and not selected |
474 | // No locking here because only called when it is safe | 474 | // No locking here because only called when it is safe |
475 | // There are three flags we're interested in: | ||
476 | // IsStatic: Object does not move, otherwise the object has mass and moves | ||
477 | // isSolid: other objects bounce off of this object | ||
478 | // collisionEvents: whether this object returns collision events | ||
475 | private void SetObjectDynamic() | 479 | private void SetObjectDynamic() |
476 | { | 480 | { |
477 | // If it's becoming dynamic, it will need hullness | 481 | // If it's becoming dynamic, it will need hullness |
@@ -481,6 +485,7 @@ public sealed class BSPrim : BSPhysObject | |||
481 | float mass = IsStatic ? 0f : _mass; | 485 | float mass = IsStatic ? 0f : _mass; |
482 | 486 | ||
483 | BulletSimAPI.SetObjectProperties(_scene.WorldID, LocalID, IsStatic, IsSolid, SubscribedEvents(), mass); | 487 | BulletSimAPI.SetObjectProperties(_scene.WorldID, LocalID, IsStatic, IsSolid, SubscribedEvents(), mass); |
488 | m_currentCollisionFlags = BulletSimAPI.GetCollisionFlags2(Body.Ptr); | ||
484 | 489 | ||
485 | // recompute any linkset parameters | 490 | // recompute any linkset parameters |
486 | Linkset.Refresh(this); | 491 | Linkset.Refresh(this); |
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSTerrainManager.cs b/OpenSim/Region/Physics/BulletSPlugin/BSTerrainManager.cs index ab45f8f..4285073 100755 --- a/OpenSim/Region/Physics/BulletSPlugin/BSTerrainManager.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSTerrainManager.cs | |||
@@ -408,8 +408,8 @@ public class BSTerrainManager | |||
408 | int mapIndex = (int)regionY * (int)mapInfo.sizeY + (int)regionX; | 408 | int mapIndex = (int)regionY * (int)mapInfo.sizeY + (int)regionX; |
409 | ret = mapInfo.heightMap[mapIndex]; | 409 | ret = mapInfo.heightMap[mapIndex]; |
410 | m_terrainModified = false; | 410 | m_terrainModified = false; |
411 | DetailLog("{0},BSTerrainManager.GetTerrainHeightAtXY,bX={1},baseY={2},szX={3},szY={4},regX={5},regY={6},index={7},ht={8}", | 411 | // DetailLog("{0},BSTerrainManager.GetTerrainHeightAtXY,bX={1},baseY={2},szX={3},szY={4},regX={5},regY={6},index={7},ht={8}", |
412 | BSScene.DetailLogZero, offsetX, offsetY, mapInfo.sizeX, mapInfo.sizeY, regionX, regionY, mapIndex, ret); | 412 | // BSScene.DetailLogZero, offsetX, offsetY, mapInfo.sizeX, mapInfo.sizeY, regionX, regionY, mapIndex, ret); |
413 | } | 413 | } |
414 | else | 414 | else |
415 | { | 415 | { |