From ffdde05bb7d3d2ca71807c3197411bf66c29aa45 Mon Sep 17 00:00:00 2001 From: SignpostMarv Date: Sat, 18 Aug 2012 15:10:44 +0100 Subject: constructor means not having to manually refer to individual properties --- .../ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs | 4 ++-- OpenSim/Region/ScriptEngine/XEngine/EventManager.cs | 4 ++-- OpenSim/Region/ScriptEngine/XEngine/XEngine.cs | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs index 7162226..24cceea 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs @@ -351,7 +351,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins q = avatar.Rotation * q; } - LSL_Types.Quaternion r = new LSL_Types.Quaternion(q.X, q.Y, q.Z, q.W); + LSL_Types.Quaternion r = new LSL_Types.Quaternion(q); LSL_Types.Vector3 forward_dir = (new LSL_Types.Vector3(1, 0, 0) * r); double mag_fwd = LSL_Types.Vector3.Mag(forward_dir); @@ -478,7 +478,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins q = avatar.Rotation * q; } - LSL_Types.Quaternion r = new LSL_Types.Quaternion(q.X, q.Y, q.Z, q.W); + LSL_Types.Quaternion r = new LSL_Types.Quaternion(q); LSL_Types.Vector3 forward_dir = (new LSL_Types.Vector3(1, 0, 0) * r); double mag_fwd = LSL_Types.Vector3.Mag(forward_dir); bool attached = (SensePoint.ParentGroup.AttachmentPoint != 0); diff --git a/OpenSim/Region/ScriptEngine/XEngine/EventManager.cs b/OpenSim/Region/ScriptEngine/XEngine/EventManager.cs index a1ad07d..cee10df 100644 --- a/OpenSim/Region/ScriptEngine/XEngine/EventManager.cs +++ b/OpenSim/Region/ScriptEngine/XEngine/EventManager.cs @@ -391,8 +391,8 @@ namespace OpenSim.Region.ScriptEngine.XEngine myScriptEngine.PostObjectEvent(localID, new EventParams( "at_rot_target", new object[] { new LSL_Types.LSLInteger(handle), - new LSL_Types.Quaternion(targetrot.X,targetrot.Y,targetrot.Z,targetrot.W), - new LSL_Types.Quaternion(atrot.X,atrot.Y,atrot.Z,atrot.W) }, + new LSL_Types.Quaternion(targetrot), + new LSL_Types.Quaternion(atrot) }, new DetectParams[0])); } diff --git a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs index a05650a..53f899a 100644 --- a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs +++ b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs @@ -1469,7 +1469,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine else if (p[i] is Vector3) lsl_p[i] = new LSL_Types.Vector3((Vector3)p[i]); else if (p[i] is Quaternion) - lsl_p[i] = new LSL_Types.Quaternion(((Quaternion)p[i]).X, ((Quaternion)p[i]).Y, ((Quaternion)p[i]).Z, ((Quaternion)p[i]).W); + lsl_p[i] = new LSL_Types.Quaternion((Quaternion)p[i]); else if (p[i] is float) lsl_p[i] = new LSL_Types.LSLFloat((float)p[i]); else @@ -1495,7 +1495,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine else if (p[i] is Vector3) lsl_p[i] = new LSL_Types.Vector3((Vector3)p[i]); else if (p[i] is Quaternion) - lsl_p[i] = new LSL_Types.Quaternion(((Quaternion)p[i]).X, ((Quaternion)p[i]).Y, ((Quaternion)p[i]).Z, ((Quaternion)p[i]).W); + lsl_p[i] = new LSL_Types.Quaternion((Quaternion)p[i]); else if (p[i] is float) lsl_p[i] = new LSL_Types.LSLFloat((float)p[i]); else -- cgit v1.1