diff options
author | Robert Adams | 2013-01-18 12:10:03 -0800 |
---|---|---|
committer | Robert Adams | 2013-01-23 14:24:42 -0800 |
commit | a0d460e6bfa64a6c43ff327dcf19b696cc380fbb (patch) | |
tree | d27d778ecb8b44cfccf8a51b9db5852b9c5d7fdc /OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs | |
parent | Add the Avination physics raycast glue so Core Physics can implement raycast (diff) | |
download | opensim-SC_OLD-a0d460e6bfa64a6c43ff327dcf19b696cc380fbb.zip opensim-SC_OLD-a0d460e6bfa64a6c43ff327dcf19b696cc380fbb.tar.gz opensim-SC_OLD-a0d460e6bfa64a6c43ff327dcf19b696cc380fbb.tar.bz2 opensim-SC_OLD-a0d460e6bfa64a6c43ff327dcf19b696cc380fbb.tar.xz |
BulletSim: remove the unused RestoreBodyDependencies used by linksets
and vehicles and clean up code by removing their kludgyness.
Diffstat (limited to 'OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs')
-rw-r--r-- | OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs b/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs index e6b8507..b37a1f8 100644 --- a/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs | |||
@@ -1606,11 +1606,6 @@ public sealed class BSPrim : BSPhysObject | |||
1606 | // Called at taint-time!!! | 1606 | // Called at taint-time!!! |
1607 | public void CreateGeomAndObject(bool forceRebuild) | 1607 | public void CreateGeomAndObject(bool forceRebuild) |
1608 | { | 1608 | { |
1609 | // If this prim is part of a linkset, we must remove and restore the physical | ||
1610 | // links if the body is rebuilt. | ||
1611 | bool needToRestoreLinkset = false; | ||
1612 | bool needToRestoreVehicle = false; | ||
1613 | |||
1614 | // Create the correct physical representation for this type of object. | 1609 | // Create the correct physical representation for this type of object. |
1615 | // Updates PhysBody and PhysShape with the new information. | 1610 | // Updates PhysBody and PhysShape with the new information. |
1616 | // Ignore 'forceRebuild'. This routine makes the right choices and changes of necessary. | 1611 | // Ignore 'forceRebuild'. This routine makes the right choices and changes of necessary. |
@@ -1619,21 +1614,10 @@ public sealed class BSPrim : BSPhysObject | |||
1619 | // Called if the current prim body is about to be destroyed. | 1614 | // Called if the current prim body is about to be destroyed. |
1620 | // Remove all the physical dependencies on the old body. | 1615 | // Remove all the physical dependencies on the old body. |
1621 | // (Maybe someday make the changing of BSShape an event to be subscribed to by BSLinkset, ...) | 1616 | // (Maybe someday make the changing of BSShape an event to be subscribed to by BSLinkset, ...) |
1622 | needToRestoreLinkset = Linkset.RemoveBodyDependencies(this); | 1617 | Linkset.RemoveBodyDependencies(this); |
1623 | needToRestoreVehicle = _vehicle.RemoveBodyDependencies(this); | 1618 | _vehicle.RemoveBodyDependencies(this); |
1624 | }); | 1619 | }); |
1625 | 1620 | ||
1626 | if (needToRestoreLinkset) | ||
1627 | { | ||
1628 | // If physical body dependencies were removed, restore them | ||
1629 | Linkset.RestoreBodyDependencies(this); | ||
1630 | } | ||
1631 | if (needToRestoreVehicle) | ||
1632 | { | ||
1633 | // If physical body dependencies were removed, restore them | ||
1634 | _vehicle.RestoreBodyDependencies(this); | ||
1635 | } | ||
1636 | |||
1637 | // Make sure the properties are set on the new object | 1621 | // Make sure the properties are set on the new object |
1638 | UpdatePhysicalParameters(); | 1622 | UpdatePhysicalParameters(); |
1639 | return; | 1623 | return; |