implicit operators mean one does not need to instantiate new objects manually
parent
52d7af05bc
commit
fb84ff96a9
|
@ -2231,8 +2231,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
|||
public LSL_Integer llRotTarget(LSL_Rotation rot, double error)
|
||||
{
|
||||
m_host.AddScriptLPS(1);
|
||||
return m_host.ParentGroup.registerRotTargetWaypoint(
|
||||
new Quaternion((float)rot.x, (float)rot.y, (float)rot.z, (float)rot.s), (float)error);
|
||||
return m_host.ParentGroup.registerRotTargetWaypoint(rot, (float)error);
|
||||
}
|
||||
|
||||
public void llRotTargetRemove(int number)
|
||||
|
@ -10531,7 +10530,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
|||
else
|
||||
rot = obj.GetWorldRotation();
|
||||
|
||||
LSL_Rotation objrot = new LSL_Rotation(rot.X, rot.Y, rot.Z, rot.W);
|
||||
LSL_Rotation objrot = new LSL_Rotation(rot);
|
||||
ret.Add(objrot);
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -333,8 +333,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
|||
{
|
||||
if (type == typeof(OpenMetaverse.Quaternion))
|
||||
{
|
||||
LSL_Rotation rot = (LSL_Rotation)lslparm;
|
||||
return new OpenMetaverse.Quaternion((float)rot.x,(float)rot.y,(float)rot.z,(float)rot.s);
|
||||
return (OpenMetaverse.Quaternion)((LSL_Rotation)lslparm);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -366,8 +365,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
|||
result[i] = new UUID((LSL_Key)plist[i]);
|
||||
else if (plist[i] is LSL_Rotation)
|
||||
{
|
||||
LSL_Rotation rot = (LSL_Rotation)plist[i];
|
||||
result[i] = new OpenMetaverse.Quaternion((float)rot.x,(float)rot.y,(float)rot.z,(float)rot.s);
|
||||
result[i] = (OpenMetaverse.Quaternion)(
|
||||
(LSL_Rotation)plist[i]);
|
||||
}
|
||||
else if (plist[i] is LSL_Vector)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue