diff options
author | idb | 2009-03-21 11:42:31 +0000 |
---|---|---|
committer | idb | 2009-03-21 11:42:31 +0000 |
commit | 2d387c25b834988f1a0ffd5429e0d1a0b7bc0222 (patch) | |
tree | 02e83442b7345619e19029412bbb7cf0a213b289 /OpenSim | |
parent | * Finishing up the last commit by adding ISunModule (diff) | |
download | opensim-SC_OLD-2d387c25b834988f1a0ffd5429e0d1a0b7bc0222.zip opensim-SC_OLD-2d387c25b834988f1a0ffd5429e0d1a0b7bc0222.tar.gz opensim-SC_OLD-2d387c25b834988f1a0ffd5429e0d1a0b7bc0222.tar.bz2 opensim-SC_OLD-2d387c25b834988f1a0ffd5429e0d1a0b7bc0222.tar.xz |
Move a check for null PhysActor in applyImpulse so that attachments can move avatars.
Fixes Mantis #3160
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index debab8d..968f94b 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | |||
@@ -1514,19 +1514,19 @@ namespace OpenSim.Region.Framework.Scenes | |||
1514 | SceneObjectPart rootpart = m_rootPart; | 1514 | SceneObjectPart rootpart = m_rootPart; |
1515 | if (rootpart != null) | 1515 | if (rootpart != null) |
1516 | { | 1516 | { |
1517 | if (rootpart.PhysActor != null) | 1517 | if (IsAttachment) |
1518 | { | 1518 | { |
1519 | if (IsAttachment) | 1519 | ScenePresence avatar = m_scene.GetScenePresence(rootpart.AttachedAvatar); |
1520 | if (avatar != null) | ||
1520 | { | 1521 | { |
1521 | ScenePresence avatar = m_scene.GetScenePresence(rootpart.AttachedAvatar); | 1522 | avatar.PushForce(impulse); |
1522 | if (avatar != null) | ||
1523 | { | ||
1524 | avatar.PushForce(impulse); | ||
1525 | } | ||
1526 | } | 1523 | } |
1527 | else | 1524 | } |
1525 | else | ||
1526 | { | ||
1527 | if (rootpart.PhysActor != null) | ||
1528 | { | 1528 | { |
1529 | rootpart.PhysActor.AddForce(impulse,true); | 1529 | rootpart.PhysActor.AddForce(impulse, true); |
1530 | m_scene.PhysicsScene.AddPhysicsActorTaint(rootpart.PhysActor); | 1530 | m_scene.PhysicsScene.AddPhysicsActorTaint(rootpart.PhysActor); |
1531 | } | 1531 | } |
1532 | } | 1532 | } |