refactor: use SOG register target waypoints and rots directly instead of calling through the SOP, which doesn't make conceptual sense anyway.

remove-scene-viewer
Justin Clark-Casey (justincc) 2011-09-01 02:18:31 +01:00
parent 7eca929686
commit c491cdcb95
2 changed files with 6 additions and 24 deletions

View File

@ -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;

View File

@ -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)