constructor means not having to manually refer to individual properties

integration
SignpostMarv 2012-08-18 15:10:44 +01:00 committed by Melanie
parent fb84ff96a9
commit ffdde05bb7
3 changed files with 6 additions and 6 deletions

View File

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

View File

@ -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]));
}

View File

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