diff options
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 51 |
1 files changed, 27 insertions, 24 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index 825f2a3..3ab7e5a 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | |||
@@ -1306,19 +1306,20 @@ namespace OpenSim.Region.Framework.Scenes | |||
1306 | { | 1306 | { |
1307 | get | 1307 | get |
1308 | { | 1308 | { |
1309 | if (ParentID != 0 && ParentGroup != null) | 1309 | if (ParentGroup.RootPart == this) |
1310 | m_buoyancy = ParentGroup.RootPart.Buoyancy; | 1310 | return m_buoyancy; |
1311 | return m_buoyancy; | 1311 | |
1312 | return ParentGroup.RootPart.Buoyancy; | ||
1312 | } | 1313 | } |
1313 | set | 1314 | set |
1314 | { | 1315 | { |
1315 | m_buoyancy = value; | 1316 | if (ParentGroup.RootPart != this) |
1316 | if (ParentID != 0) | ||
1317 | { | 1317 | { |
1318 | if (ParentGroup != null) | 1318 | ParentGroup.RootPart.Buoyancy = value; |
1319 | ParentGroup.RootPart.Buoyancy = value; | 1319 | return; |
1320 | } | 1320 | } |
1321 | else if (PhysActor != null) | 1321 | m_buoyancy = value; |
1322 | if (PhysActor != null) | ||
1322 | PhysActor.Buoyancy = value; | 1323 | PhysActor.Buoyancy = value; |
1323 | } | 1324 | } |
1324 | } | 1325 | } |
@@ -1327,20 +1328,21 @@ namespace OpenSim.Region.Framework.Scenes | |||
1327 | { | 1328 | { |
1328 | get | 1329 | get |
1329 | { | 1330 | { |
1330 | if (ParentID != 0 && ParentGroup != null) | 1331 | if (ParentGroup.RootPart == this) |
1331 | m_force = ParentGroup.RootPart.Force; | 1332 | return m_force; |
1332 | return m_force; | 1333 | |
1334 | return ParentGroup.RootPart.Force; | ||
1333 | } | 1335 | } |
1334 | 1336 | ||
1335 | set | 1337 | set |
1336 | { | 1338 | { |
1337 | m_force = value; | 1339 | if (ParentGroup.RootPart != this) |
1338 | if (ParentID != 0) | ||
1339 | { | 1340 | { |
1340 | if (ParentGroup != null) | 1341 | ParentGroup.RootPart.Force = value; |
1341 | ParentGroup.RootPart.Force = value; | 1342 | return; |
1342 | } | 1343 | } |
1343 | else if (PhysActor != null) | 1344 | m_force = value; |
1345 | if (PhysActor != null) | ||
1344 | PhysActor.Force = value; | 1346 | PhysActor.Force = value; |
1345 | } | 1347 | } |
1346 | } | 1348 | } |
@@ -1349,20 +1351,21 @@ namespace OpenSim.Region.Framework.Scenes | |||
1349 | { | 1351 | { |
1350 | get | 1352 | get |
1351 | { | 1353 | { |
1352 | if (ParentID != 0 && ParentGroup != null) | 1354 | if (ParentGroup.RootPart == this) |
1353 | m_torque = ParentGroup.RootPart.Torque; | 1355 | return m_torque; |
1354 | return m_torque; | 1356 | |
1357 | return ParentGroup.RootPart.Torque; | ||
1355 | } | 1358 | } |
1356 | 1359 | ||
1357 | set | 1360 | set |
1358 | { | 1361 | { |
1359 | m_torque = value; | 1362 | if (ParentGroup.RootPart != this) |
1360 | if (ParentID != 0) | ||
1361 | { | 1363 | { |
1362 | if (ParentGroup != null) | 1364 | ParentGroup.RootPart.Torque = value; |
1363 | ParentGroup.RootPart.Torque = value; | 1365 | return; |
1364 | } | 1366 | } |
1365 | else if (PhysActor != null) | 1367 | m_torque = value; |
1368 | if (PhysActor != null) | ||
1366 | PhysActor.Torque = value; | 1369 | PhysActor.Torque = value; |
1367 | } | 1370 | } |
1368 | } | 1371 | } |