aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
diff options
context:
space:
mode:
authorTeravus Ovares2008-03-14 06:20:50 +0000
committerTeravus Ovares2008-03-14 06:20:50 +0000
commitae9a98ceb15e43dc24c485955051f554a2247401 (patch)
tree27cd062a1ffd841eefba779db9752aa02350a8d1 /OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
parent* Preliminary work with the ODEPlugin to collect collision data. (diff)
downloadopensim-SC_OLD-ae9a98ceb15e43dc24c485955051f554a2247401.zip
opensim-SC_OLD-ae9a98ceb15e43dc24c485955051f554a2247401.tar.gz
opensim-SC_OLD-ae9a98ceb15e43dc24c485955051f554a2247401.tar.bz2
opensim-SC_OLD-ae9a98ceb15e43dc24c485955051f554a2247401.tar.xz
* Added proper handling of llSetStatus(STATUS_PHYSICS,BOOL)
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs')
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs47
1 files changed, 47 insertions, 0 deletions
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
index 041dc4e..47c4567 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
@@ -590,6 +590,53 @@ namespace OpenSim.Region.Environment.Scenes
590 SetPartAsRoot(newPart); 590 SetPartAsRoot(newPart);
591 } 591 }
592 592
593 public void ScriptSetPhysicsStatus(bool UsePhysics)
594 {
595 if (m_scene.m_physicalPrim)
596 {
597 lock (m_parts)
598 {
599 foreach (SceneObjectPart part in m_parts.Values)
600 {
601 if (UsePhysics)
602 part.AddFlag(LLObject.ObjectFlags.Physics);
603 else
604 part.RemFlag(LLObject.ObjectFlags.Physics);
605
606 part.DoPhysicsPropertyUpdate(UsePhysics, false);
607 IsSelected = false;
608 }
609 }
610 }
611
612 }
613
614 public void ScriptSetPhantomStatus(bool PhantomStatus)
615 {
616 lock (m_parts)
617 {
618 foreach (SceneObjectPart part in m_parts.Values)
619 {
620 if (PhantomStatus)
621 {
622 part.AddFlag(LLObject.ObjectFlags.Phantom);
623 if (part.PhysActor != null)
624 {
625 m_scene.PhysicsScene.RemovePrim(part.PhysActor);
626 }
627 }
628 else
629 {
630 part.RemFlag(LLObject.ObjectFlags.Phantom);
631 if ((part.ObjectFlags & (int)LLObject.ObjectFlags.Physics) != 0)
632 {
633 part.DoPhysicsPropertyUpdate(true, false);
634 }
635 }
636 }
637 }
638 }
639
593 public void applyImpulse(PhysicsVector impulse) 640 public void applyImpulse(PhysicsVector impulse)
594 { 641 {
595 // We check if rootpart is null here because scripts don't delete if you delete the host. 642 // We check if rootpart is null here because scripts don't delete if you delete the host.