diff options
author | SignpostMarv | 2012-08-18 15:10:44 +0100 |
---|---|---|
committer | Melanie | 2012-08-18 18:29:59 +0100 |
commit | ffdde05bb7d3d2ca71807c3197411bf66c29aa45 (patch) | |
tree | 92ff2cf019f13ac9a895a34c7b2aca5a57c89c74 | |
parent | implicit operators mean one does not need to instantiate new objects manually (diff) | |
download | opensim-SC_OLD-ffdde05bb7d3d2ca71807c3197411bf66c29aa45.zip opensim-SC_OLD-ffdde05bb7d3d2ca71807c3197411bf66c29aa45.tar.gz opensim-SC_OLD-ffdde05bb7d3d2ca71807c3197411bf66c29aa45.tar.bz2 opensim-SC_OLD-ffdde05bb7d3d2ca71807c3197411bf66c29aa45.tar.xz |
constructor means not having to manually refer to individual properties
3 files changed, 6 insertions, 6 deletions
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 | |||
351 | q = avatar.Rotation * q; | 351 | q = avatar.Rotation * q; |
352 | } | 352 | } |
353 | 353 | ||
354 | LSL_Types.Quaternion r = new LSL_Types.Quaternion(q.X, q.Y, q.Z, q.W); | 354 | LSL_Types.Quaternion r = new LSL_Types.Quaternion(q); |
355 | LSL_Types.Vector3 forward_dir = (new LSL_Types.Vector3(1, 0, 0) * r); | 355 | LSL_Types.Vector3 forward_dir = (new LSL_Types.Vector3(1, 0, 0) * r); |
356 | double mag_fwd = LSL_Types.Vector3.Mag(forward_dir); | 356 | double mag_fwd = LSL_Types.Vector3.Mag(forward_dir); |
357 | 357 | ||
@@ -478,7 +478,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins | |||
478 | q = avatar.Rotation * q; | 478 | q = avatar.Rotation * q; |
479 | } | 479 | } |
480 | 480 | ||
481 | LSL_Types.Quaternion r = new LSL_Types.Quaternion(q.X, q.Y, q.Z, q.W); | 481 | LSL_Types.Quaternion r = new LSL_Types.Quaternion(q); |
482 | LSL_Types.Vector3 forward_dir = (new LSL_Types.Vector3(1, 0, 0) * r); | 482 | LSL_Types.Vector3 forward_dir = (new LSL_Types.Vector3(1, 0, 0) * r); |
483 | double mag_fwd = LSL_Types.Vector3.Mag(forward_dir); | 483 | double mag_fwd = LSL_Types.Vector3.Mag(forward_dir); |
484 | bool attached = (SensePoint.ParentGroup.AttachmentPoint != 0); | 484 | 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 | |||
391 | myScriptEngine.PostObjectEvent(localID, new EventParams( | 391 | myScriptEngine.PostObjectEvent(localID, new EventParams( |
392 | "at_rot_target", new object[] { | 392 | "at_rot_target", new object[] { |
393 | new LSL_Types.LSLInteger(handle), | 393 | new LSL_Types.LSLInteger(handle), |
394 | new LSL_Types.Quaternion(targetrot.X,targetrot.Y,targetrot.Z,targetrot.W), | 394 | new LSL_Types.Quaternion(targetrot), |
395 | new LSL_Types.Quaternion(atrot.X,atrot.Y,atrot.Z,atrot.W) }, | 395 | new LSL_Types.Quaternion(atrot) }, |
396 | new DetectParams[0])); | 396 | new DetectParams[0])); |
397 | } | 397 | } |
398 | 398 | ||
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 | |||
1469 | else if (p[i] is Vector3) | 1469 | else if (p[i] is Vector3) |
1470 | lsl_p[i] = new LSL_Types.Vector3((Vector3)p[i]); | 1470 | lsl_p[i] = new LSL_Types.Vector3((Vector3)p[i]); |
1471 | else if (p[i] is Quaternion) | 1471 | else if (p[i] is Quaternion) |
1472 | lsl_p[i] = new LSL_Types.Quaternion(((Quaternion)p[i]).X, ((Quaternion)p[i]).Y, ((Quaternion)p[i]).Z, ((Quaternion)p[i]).W); | 1472 | lsl_p[i] = new LSL_Types.Quaternion((Quaternion)p[i]); |
1473 | else if (p[i] is float) | 1473 | else if (p[i] is float) |
1474 | lsl_p[i] = new LSL_Types.LSLFloat((float)p[i]); | 1474 | lsl_p[i] = new LSL_Types.LSLFloat((float)p[i]); |
1475 | else | 1475 | else |
@@ -1495,7 +1495,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine | |||
1495 | else if (p[i] is Vector3) | 1495 | else if (p[i] is Vector3) |
1496 | lsl_p[i] = new LSL_Types.Vector3((Vector3)p[i]); | 1496 | lsl_p[i] = new LSL_Types.Vector3((Vector3)p[i]); |
1497 | else if (p[i] is Quaternion) | 1497 | else if (p[i] is Quaternion) |
1498 | lsl_p[i] = new LSL_Types.Quaternion(((Quaternion)p[i]).X, ((Quaternion)p[i]).Y, ((Quaternion)p[i]).Z, ((Quaternion)p[i]).W); | 1498 | lsl_p[i] = new LSL_Types.Quaternion((Quaternion)p[i]); |
1499 | else if (p[i] is float) | 1499 | else if (p[i] is float) |
1500 | lsl_p[i] = new LSL_Types.LSLFloat((float)p[i]); | 1500 | lsl_p[i] = new LSL_Types.LSLFloat((float)p[i]); |
1501 | else | 1501 | else |