aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment
diff options
context:
space:
mode:
authorTeravus Ovares2008-03-25 03:36:31 +0000
committerTeravus Ovares2008-03-25 03:36:31 +0000
commita21112cceedfc93840b935feae4ad8725c4afb48 (patch)
tree43efce03cfc00168c04579e1cf3611eebde8ebde /OpenSim/Region/Environment
parentAdded monodevelop support to runprebuild.sh (diff)
downloadopensim-SC-a21112cceedfc93840b935feae4ad8725c4afb48.zip
opensim-SC-a21112cceedfc93840b935feae4ad8725c4afb48.tar.gz
opensim-SC-a21112cceedfc93840b935feae4ad8725c4afb48.tar.bz2
opensim-SC-a21112cceedfc93840b935feae4ad8725c4afb48.tar.xz
* Adds llMoveToTarget and llStopMoveToTarget support to the ODEPlugin.
* It doesn't generate at_target events, because they don't exist yet in the script engine. * The Tau is different, however, compatible with scripts I tested. * Not perfect... but pretty good.
Diffstat (limited to 'OpenSim/Region/Environment')
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs21
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectPart.cs18
2 files changed, 39 insertions, 0 deletions
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
index 2875874..2f2a1be 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
@@ -694,6 +694,25 @@ namespace OpenSim.Region.Environment.Scenes
694 } 694 }
695 } 695 }
696 696
697 public void moveToTarget(LLVector3 target, float tau)
698 {
699 SceneObjectPart rootpart = m_rootPart;
700 if (rootpart != null)
701 {
702 rootpart.PhysActor.PIDTarget = new PhysicsVector(target.X, target.Y, target.Z);
703 rootpart.PhysActor.PIDTau = tau;
704 rootpart.PhysActor.PIDActive = true;
705 }
706 }
707 public void stopMoveToTarget()
708 {
709 SceneObjectPart rootpart = m_rootPart;
710 if (rootpart != null)
711 {
712 rootpart.PhysActor.PIDActive = false;
713 }
714 }
715
697 public void SetRootPartOwner(SceneObjectPart part, LLUUID cAgentID, LLUUID cGroupID) 716 public void SetRootPartOwner(SceneObjectPart part, LLUUID cAgentID, LLUUID cGroupID)
698 { 717 {
699 part.LastOwnerID = part.OwnerID; 718 part.LastOwnerID = part.OwnerID;
@@ -2019,5 +2038,7 @@ namespace OpenSim.Region.Environment.Scenes
2019 } 2038 }
2020 } 2039 }
2021 } 2040 }
2041
2042
2022 } 2043 }
2023} 2044}
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
index 48177dc..cbefc19 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
@@ -586,6 +586,24 @@ namespace OpenSim.Region.Environment.Scenes
586 } 586 }
587 } 587 }
588 588
589 public void MoveToTarget(LLVector3 target, float tau)
590 {
591 if (tau > 0)
592 {
593 m_parentGroup.moveToTarget(target, tau);
594 }
595 else
596 {
597 StopMoveToTarget();
598 }
599
600 }
601
602 public void StopMoveToTarget()
603 {
604 m_parentGroup.stopMoveToTarget();
605 }
606
589 public void TriggerScriptChangedEvent(Changed val) 607 public void TriggerScriptChangedEvent(Changed val)
590 { 608 {
591 if (m_parentGroup != null) 609 if (m_parentGroup != null)