diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs index 2e44c54..2bc7fd3 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs | |||
@@ -1301,8 +1301,19 @@ namespace OpenSim.Region.Environment.Scenes | |||
1301 | { | 1301 | { |
1302 | if (rootpart.PhysActor != null) | 1302 | if (rootpart.PhysActor != null) |
1303 | { | 1303 | { |
1304 | rootpart.PhysActor.AddForce(impulse); | 1304 | if (rootpart.m_IsAttachment) |
1305 | m_scene.PhysicsScene.AddPhysicsActorTaint(rootpart.PhysActor); | 1305 | { |
1306 | ScenePresence avatar = m_scene.GetScenePresence(rootpart.m_attachedAvatar); | ||
1307 | if (avatar != null) | ||
1308 | { | ||
1309 | avatar.PushForce(impulse); | ||
1310 | } | ||
1311 | } | ||
1312 | else | ||
1313 | { | ||
1314 | rootpart.PhysActor.AddForce(impulse,true); | ||
1315 | m_scene.PhysicsScene.AddPhysicsActorTaint(rootpart.PhysActor); | ||
1316 | } | ||
1306 | } | 1317 | } |
1307 | } | 1318 | } |
1308 | } | 1319 | } |
@@ -1909,7 +1920,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1909 | LLVector3 llmoveforce = pos - AbsolutePosition; | 1920 | LLVector3 llmoveforce = pos - AbsolutePosition; |
1910 | PhysicsVector grabforce = new PhysicsVector(llmoveforce.X, llmoveforce.Y, llmoveforce.Z); | 1921 | PhysicsVector grabforce = new PhysicsVector(llmoveforce.X, llmoveforce.Y, llmoveforce.Z); |
1911 | grabforce = (grabforce / 10) * m_rootPart.PhysActor.Mass; | 1922 | grabforce = (grabforce / 10) * m_rootPart.PhysActor.Mass; |
1912 | m_rootPart.PhysActor.AddForce(grabforce); | 1923 | m_rootPart.PhysActor.AddForce(grabforce,true); |
1913 | m_scene.PhysicsScene.AddPhysicsActorTaint(m_rootPart.PhysActor); | 1924 | m_scene.PhysicsScene.AddPhysicsActorTaint(m_rootPart.PhysActor); |
1914 | } | 1925 | } |
1915 | else | 1926 | else |