From c491cdcb952ba50b84a2ba710bb3771421cc61f2 Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Thu, 1 Sep 2011 02:18:31 +0100 Subject: [PATCH] refactor: use SOG register target waypoints and rots directly instead of calling through the SOP, which doesn't make conceptual sense anyway. --- .../Framework/Scenes/SceneObjectPart.cs | 20 ------------------- .../Shared/Api/Implementation/LSL_Api.cs | 10 ++++++---- 2 files changed, 6 insertions(+), 24 deletions(-) diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index 68b24cde4d..a8f2ebd819 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs @@ -4766,26 +4766,6 @@ namespace OpenSim.Region.Framework.Scenes } } - public int registerTargetWaypoint(Vector3 target, float tolerance) - { - return m_parentGroup.registerTargetWaypoint(target, tolerance); - } - - public void unregisterTargetWaypoint(int handle) - { - m_parentGroup.unregisterTargetWaypoint(handle); - } - - public int registerRotTargetWaypoint(Quaternion target, float tolerance) - { - return m_parentGroup.registerRotTargetWaypoint(target, tolerance); - } - - public void unregisterRotTargetWaypoint(int handle) - { - m_parentGroup.unregisterRotTargetWaypoint(handle); - } - public void SetCameraAtOffset(Vector3 v) { 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 2fd98f6e72..88e884dabc 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 public LSL_Integer llTarget(LSL_Vector position, double range) { m_host.AddScriptLPS(1); - return m_host.registerTargetWaypoint(new Vector3((float)position.x, (float)position.y, (float)position.z), (float)range); + return m_host.ParentGroup.registerTargetWaypoint( + new Vector3((float)position.x, (float)position.y, (float)position.z), (float)range); } public void llTargetRemove(int number) { m_host.AddScriptLPS(1); - m_host.unregisterTargetWaypoint(number); + m_host.ParentGroup.unregisterTargetWaypoint(number); } public LSL_Integer llRotTarget(LSL_Rotation rot, double error) { m_host.AddScriptLPS(1); - return m_host.registerRotTargetWaypoint(new Quaternion((float)rot.x, (float)rot.y, (float)rot.z, (float)rot.s), (float)error); + return m_host.ParentGroup.registerRotTargetWaypoint( + new Quaternion((float)rot.x, (float)rot.y, (float)rot.z, (float)rot.s), (float)error); } public void llRotTargetRemove(int number) { m_host.AddScriptLPS(1); - m_host.unregisterRotTargetWaypoint(number); + m_host.ParentGroup.unregisterRotTargetWaypoint(number); } public void llMoveToTarget(LSL_Vector target, double tau)