aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2011-09-01 02:18:31 +0100
committerJustin Clark-Casey (justincc)2011-09-01 02:18:31 +0100
commitc491cdcb952ba50b84a2ba710bb3771421cc61f2 (patch)
tree7ade67a8245018356d7306054d65660e588e8903
parentEliminate pointless checks of SOG.RootPart != null (diff)
downloadopensim-SC_OLD-c491cdcb952ba50b84a2ba710bb3771421cc61f2.zip
opensim-SC_OLD-c491cdcb952ba50b84a2ba710bb3771421cc61f2.tar.gz
opensim-SC_OLD-c491cdcb952ba50b84a2ba710bb3771421cc61f2.tar.bz2
opensim-SC_OLD-c491cdcb952ba50b84a2ba710bb3771421cc61f2.tar.xz
refactor: use SOG register target waypoints and rots directly instead of calling through the SOP, which doesn't make conceptual sense anyway.
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPart.cs20
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs10
2 files changed, 6 insertions, 24 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index 68b24cd..a8f2ebd 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -4766,26 +4766,6 @@ namespace OpenSim.Region.Framework.Scenes
4766 } 4766 }
4767 } 4767 }
4768 4768
4769 public int registerTargetWaypoint(Vector3 target, float tolerance)
4770 {
4771 return m_parentGroup.registerTargetWaypoint(target, tolerance);
4772 }
4773
4774 public void unregisterTargetWaypoint(int handle)
4775 {
4776 m_parentGroup.unregisterTargetWaypoint(handle);
4777 }
4778
4779 public int registerRotTargetWaypoint(Quaternion target, float tolerance)
4780 {
4781 return m_parentGroup.registerRotTargetWaypoint(target, tolerance);
4782 }
4783
4784 public void unregisterRotTargetWaypoint(int handle)
4785 {
4786 m_parentGroup.unregisterRotTargetWaypoint(handle);
4787 }
4788
4789 public void SetCameraAtOffset(Vector3 v) 4769 public void SetCameraAtOffset(Vector3 v)
4790 { 4770 {
4791 m_cameraAtOffset = v; 4771 m_cameraAtOffset = v;
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index 2fd98f6..88e884d 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -2141,25 +2141,27 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2141 public LSL_Integer llTarget(LSL_Vector position, double range) 2141 public LSL_Integer llTarget(LSL_Vector position, double range)
2142 { 2142 {
2143 m_host.AddScriptLPS(1); 2143 m_host.AddScriptLPS(1);
2144 return m_host.registerTargetWaypoint(new Vector3((float)position.x, (float)position.y, (float)position.z), (float)range); 2144 return m_host.ParentGroup.registerTargetWaypoint(
2145 new Vector3((float)position.x, (float)position.y, (float)position.z), (float)range);
2145 } 2146 }
2146 2147
2147 public void llTargetRemove(int number) 2148 public void llTargetRemove(int number)
2148 { 2149 {
2149 m_host.AddScriptLPS(1); 2150 m_host.AddScriptLPS(1);
2150 m_host.unregisterTargetWaypoint(number); 2151 m_host.ParentGroup.unregisterTargetWaypoint(number);
2151 } 2152 }
2152 2153
2153 public LSL_Integer llRotTarget(LSL_Rotation rot, double error) 2154 public LSL_Integer llRotTarget(LSL_Rotation rot, double error)
2154 { 2155 {
2155 m_host.AddScriptLPS(1); 2156 m_host.AddScriptLPS(1);
2156 return m_host.registerRotTargetWaypoint(new Quaternion((float)rot.x, (float)rot.y, (float)rot.z, (float)rot.s), (float)error); 2157 return m_host.ParentGroup.registerRotTargetWaypoint(
2158 new Quaternion((float)rot.x, (float)rot.y, (float)rot.z, (float)rot.s), (float)error);
2157 } 2159 }
2158 2160
2159 public void llRotTargetRemove(int number) 2161 public void llRotTargetRemove(int number)
2160 { 2162 {
2161 m_host.AddScriptLPS(1); 2163 m_host.AddScriptLPS(1);
2162 m_host.unregisterRotTargetWaypoint(number); 2164 m_host.ParentGroup.unregisterRotTargetWaypoint(number);
2163 } 2165 }
2164 2166
2165 public void llMoveToTarget(LSL_Vector target, double tau) 2167 public void llMoveToTarget(LSL_Vector target, double tau)