diff options
author | Teravus Ovares | 2008-01-17 14:59:05 +0000 |
---|---|---|
committer | Teravus Ovares | 2008-01-17 14:59:05 +0000 |
commit | 18c959df12983256d73240a86fa0bad12c4e36ce (patch) | |
tree | d85ef34d3196461f8d3dd0ae653b37912f098a7e /OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs | |
parent | * added ForEachPart helper (diff) | |
download | opensim-SC_OLD-18c959df12983256d73240a86fa0bad12c4e36ce.zip opensim-SC_OLD-18c959df12983256d73240a86fa0bad12c4e36ce.tar.gz opensim-SC_OLD-18c959df12983256d73240a86fa0bad12c4e36ce.tar.bz2 opensim-SC_OLD-18c959df12983256d73240a86fa0bad12c4e36ce.tar.xz |
* Added llApplyImpulse in the global frame. The object must be physical before this'll do anything. Be careful with this function as it's easy to loose prim.
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs index 6447403..5790591 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs | |||
@@ -578,6 +578,16 @@ namespace OpenSim.Region.Environment.Scenes | |||
578 | SetPartAsRoot(newPart); | 578 | SetPartAsRoot(newPart); |
579 | } | 579 | } |
580 | 580 | ||
581 | public void applyImpulse(PhysicsVector impulse) | ||
582 | { | ||
583 | SceneObjectPart rootpart = m_rootPart; | ||
584 | if (m_rootPart.PhysActor != null) | ||
585 | { | ||
586 | m_rootPart.PhysActor.AddForce(impulse); | ||
587 | m_scene.PhysicsScene.AddPhysicsActorTaint(m_rootPart.PhysActor); | ||
588 | } | ||
589 | } | ||
590 | |||
581 | public void SetRootPartOwner(SceneObjectPart part, LLUUID cAgentID, LLUUID cGroupID) | 591 | public void SetRootPartOwner(SceneObjectPart part, LLUUID cAgentID, LLUUID cGroupID) |
582 | { | 592 | { |
583 | part.LastOwnerID = part.OwnerID; | 593 | part.LastOwnerID = part.OwnerID; |