aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs17
-rw-r--r--OpenSim/Region/Environment/Scenes/ScenePresence.cs8
2 files changed, 22 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
diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs
index fcd93d8..aefecd0 100644
--- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs
@@ -2389,5 +2389,13 @@ namespace OpenSim.Region.Environment.Scenes
2389 2389
2390 info.AddValue("m_knownPrimUUID", knownPrimUUID_work); 2390 info.AddValue("m_knownPrimUUID", knownPrimUUID_work);
2391 } 2391 }
2392
2393 internal void PushForce(PhysicsVector impulse)
2394 {
2395 if (PhysicsActor != null)
2396 {
2397 PhysicsActor.AddForce(impulse,true);
2398 }
2399 }
2392 } 2400 }
2393} 2401}