constructor means not having to manually refer to individual properties
parent
fb84ff96a9
commit
ffdde05bb7
|
@ -351,7 +351,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
|
||||||
q = avatar.Rotation * q;
|
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);
|
LSL_Types.Vector3 forward_dir = (new LSL_Types.Vector3(1, 0, 0) * r);
|
||||||
double mag_fwd = LSL_Types.Vector3.Mag(forward_dir);
|
double mag_fwd = LSL_Types.Vector3.Mag(forward_dir);
|
||||||
|
|
||||||
|
@ -478,7 +478,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
|
||||||
q = avatar.Rotation * q;
|
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);
|
LSL_Types.Vector3 forward_dir = (new LSL_Types.Vector3(1, 0, 0) * r);
|
||||||
double mag_fwd = LSL_Types.Vector3.Mag(forward_dir);
|
double mag_fwd = LSL_Types.Vector3.Mag(forward_dir);
|
||||||
bool attached = (SensePoint.ParentGroup.AttachmentPoint != 0);
|
bool attached = (SensePoint.ParentGroup.AttachmentPoint != 0);
|
||||||
|
|
|
@ -391,8 +391,8 @@ namespace OpenSim.Region.ScriptEngine.XEngine
|
||||||
myScriptEngine.PostObjectEvent(localID, new EventParams(
|
myScriptEngine.PostObjectEvent(localID, new EventParams(
|
||||||
"at_rot_target", new object[] {
|
"at_rot_target", new object[] {
|
||||||
new LSL_Types.LSLInteger(handle),
|
new LSL_Types.LSLInteger(handle),
|
||||||
new LSL_Types.Quaternion(targetrot.X,targetrot.Y,targetrot.Z,targetrot.W),
|
new LSL_Types.Quaternion(targetrot),
|
||||||
new LSL_Types.Quaternion(atrot.X,atrot.Y,atrot.Z,atrot.W) },
|
new LSL_Types.Quaternion(atrot) },
|
||||||
new DetectParams[0]));
|
new DetectParams[0]));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1469,7 +1469,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
|
||||||
else if (p[i] is Vector3)
|
else if (p[i] is Vector3)
|
||||||
lsl_p[i] = new LSL_Types.Vector3((Vector3)p[i]);
|
lsl_p[i] = new LSL_Types.Vector3((Vector3)p[i]);
|
||||||
else if (p[i] is Quaternion)
|
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)
|
else if (p[i] is float)
|
||||||
lsl_p[i] = new LSL_Types.LSLFloat((float)p[i]);
|
lsl_p[i] = new LSL_Types.LSLFloat((float)p[i]);
|
||||||
else
|
else
|
||||||
|
@ -1495,7 +1495,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
|
||||||
else if (p[i] is Vector3)
|
else if (p[i] is Vector3)
|
||||||
lsl_p[i] = new LSL_Types.Vector3((Vector3)p[i]);
|
lsl_p[i] = new LSL_Types.Vector3((Vector3)p[i]);
|
||||||
else if (p[i] is Quaternion)
|
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)
|
else if (p[i] is float)
|
||||||
lsl_p[i] = new LSL_Types.LSLFloat((float)p[i]);
|
lsl_p[i] = new LSL_Types.LSLFloat((float)p[i]);
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue