diff options
Diffstat (limited to '')
-rwxr-xr-x | OpenSim/Region/Physics/BulletSPlugin/BSLinkset.cs | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSLinkset.cs b/OpenSim/Region/Physics/BulletSPlugin/BSLinkset.cs index 8580928..756faed 100755 --- a/OpenSim/Region/Physics/BulletSPlugin/BSLinkset.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSLinkset.cs | |||
@@ -97,14 +97,7 @@ public abstract class BSLinkset | |||
97 | } | 97 | } |
98 | 98 | ||
99 | // We keep the prim's mass in the linkset structure since it could be dependent on other prims | 99 | // We keep the prim's mass in the linkset structure since it could be dependent on other prims |
100 | protected float m_mass; | 100 | public float LinksetMass { get; protected set; } |
101 | public float LinksetMass | ||
102 | { | ||
103 | get | ||
104 | { | ||
105 | return m_mass; | ||
106 | } | ||
107 | } | ||
108 | 101 | ||
109 | public virtual bool LinksetIsColliding { get { return false; } } | 102 | public virtual bool LinksetIsColliding { get { return false; } } |
110 | 103 | ||
@@ -128,7 +121,7 @@ public abstract class BSLinkset | |||
128 | PhysicsScene = scene; | 121 | PhysicsScene = scene; |
129 | LinksetRoot = parent; | 122 | LinksetRoot = parent; |
130 | m_children = new HashSet<BSPhysObject>(); | 123 | m_children = new HashSet<BSPhysObject>(); |
131 | m_mass = parent.RawMass; | 124 | LinksetMass = parent.RawMass; |
132 | Rebuilding = false; | 125 | Rebuilding = false; |
133 | } | 126 | } |
134 | 127 | ||
@@ -143,7 +136,7 @@ public abstract class BSLinkset | |||
143 | // Don't add the root to its own linkset | 136 | // Don't add the root to its own linkset |
144 | if (!IsRoot(child)) | 137 | if (!IsRoot(child)) |
145 | AddChildToLinkset(child); | 138 | AddChildToLinkset(child); |
146 | m_mass = ComputeLinksetMass(); | 139 | LinksetMass = ComputeLinksetMass(); |
147 | } | 140 | } |
148 | return this; | 141 | return this; |
149 | } | 142 | } |
@@ -162,7 +155,7 @@ public abstract class BSLinkset | |||
162 | return this; | 155 | return this; |
163 | } | 156 | } |
164 | RemoveChildFromLinkset(child); | 157 | RemoveChildFromLinkset(child); |
165 | m_mass = ComputeLinksetMass(); | 158 | LinksetMass = ComputeLinksetMass(); |
166 | } | 159 | } |
167 | 160 | ||
168 | // The child is down to a linkset of just itself | 161 | // The child is down to a linkset of just itself |
@@ -230,7 +223,10 @@ public abstract class BSLinkset | |||
230 | // When physical properties are changed the linkset needs to recalculate | 223 | // When physical properties are changed the linkset needs to recalculate |
231 | // its internal properties. | 224 | // its internal properties. |
232 | // May be called at runtime or taint-time. | 225 | // May be called at runtime or taint-time. |
233 | public abstract void Refresh(BSPhysObject requestor); | 226 | public virtual void Refresh(BSPhysObject requestor) |
227 | { | ||
228 | LinksetMass = ComputeLinksetMass(); | ||
229 | } | ||
234 | 230 | ||
235 | // Flag denoting the linkset is in the process of being rebuilt. | 231 | // Flag denoting the linkset is in the process of being rebuilt. |
236 | // Used to know not the schedule a rebuild in the middle of a rebuild. | 232 | // Used to know not the schedule a rebuild in the middle of a rebuild. |