diff options
author | SignpostMarv | 2012-08-18 15:04:07 +0100 |
---|---|---|
committer | Melanie | 2012-08-18 18:29:59 +0100 |
commit | fb84ff96a9ac7df564fb8f8242e0ff0d2638b438 (patch) | |
tree | 4184439a6650dbe90c00f5a51ab87ac255e5d863 /OpenSim | |
parent | adding missing refactor for LSL_Vector (diff) | |
download | opensim-SC_OLD-fb84ff96a9ac7df564fb8f8242e0ff0d2638b438.zip opensim-SC_OLD-fb84ff96a9ac7df564fb8f8242e0ff0d2638b438.tar.gz opensim-SC_OLD-fb84ff96a9ac7df564fb8f8242e0ff0d2638b438.tar.bz2 opensim-SC_OLD-fb84ff96a9ac7df564fb8f8242e0ff0d2638b438.tar.xz |
implicit operators mean one does not need to instantiate new objects manually
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 5 | ||||
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/MOD_Api.cs | 7 |
2 files changed, 5 insertions, 7 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 4d542d50..87298e3 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -2231,8 +2231,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2231 | public LSL_Integer llRotTarget(LSL_Rotation rot, double error) | 2231 | public LSL_Integer llRotTarget(LSL_Rotation rot, double error) |
2232 | { | 2232 | { |
2233 | m_host.AddScriptLPS(1); | 2233 | m_host.AddScriptLPS(1); |
2234 | return m_host.ParentGroup.registerRotTargetWaypoint( | 2234 | return m_host.ParentGroup.registerRotTargetWaypoint(rot, (float)error); |
2235 | new Quaternion((float)rot.x, (float)rot.y, (float)rot.z, (float)rot.s), (float)error); | ||
2236 | } | 2235 | } |
2237 | 2236 | ||
2238 | public void llRotTargetRemove(int number) | 2237 | public void llRotTargetRemove(int number) |
@@ -10531,7 +10530,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
10531 | else | 10530 | else |
10532 | rot = obj.GetWorldRotation(); | 10531 | rot = obj.GetWorldRotation(); |
10533 | 10532 | ||
10534 | LSL_Rotation objrot = new LSL_Rotation(rot.X, rot.Y, rot.Z, rot.W); | 10533 | LSL_Rotation objrot = new LSL_Rotation(rot); |
10535 | ret.Add(objrot); | 10534 | ret.Add(objrot); |
10536 | } | 10535 | } |
10537 | break; | 10536 | break; |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/MOD_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/MOD_Api.cs index 929948b..84cf6ca 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/MOD_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/MOD_Api.cs | |||
@@ -333,8 +333,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
333 | { | 333 | { |
334 | if (type == typeof(OpenMetaverse.Quaternion)) | 334 | if (type == typeof(OpenMetaverse.Quaternion)) |
335 | { | 335 | { |
336 | LSL_Rotation rot = (LSL_Rotation)lslparm; | 336 | return (OpenMetaverse.Quaternion)((LSL_Rotation)lslparm); |
337 | return new OpenMetaverse.Quaternion((float)rot.x,(float)rot.y,(float)rot.z,(float)rot.s); | ||
338 | } | 337 | } |
339 | } | 338 | } |
340 | 339 | ||
@@ -366,8 +365,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
366 | result[i] = new UUID((LSL_Key)plist[i]); | 365 | result[i] = new UUID((LSL_Key)plist[i]); |
367 | else if (plist[i] is LSL_Rotation) | 366 | else if (plist[i] is LSL_Rotation) |
368 | { | 367 | { |
369 | LSL_Rotation rot = (LSL_Rotation)plist[i]; | 368 | result[i] = (OpenMetaverse.Quaternion)( |
370 | result[i] = new OpenMetaverse.Quaternion((float)rot.x,(float)rot.y,(float)rot.z,(float)rot.s); | 369 | (LSL_Rotation)plist[i]); |
371 | } | 370 | } |
372 | else if (plist[i] is LSL_Vector) | 371 | else if (plist[i] is LSL_Vector) |
373 | { | 372 | { |