aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared/Api
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 /OpenSim/Region/ScriptEngine/Shared/Api
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.
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs10
1 files changed, 6 insertions, 4 deletions
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)