mirror of
https://github.com/opensim/opensim.git
synced 2026-08-01 06:06:06 +08:00
refactor: use SOG register target waypoints and rots directly instead of calling through the SOP, which doesn't make conceptual sense anyway.
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user