aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Common/LSL_Types.cs
diff options
context:
space:
mode:
authoralondria2008-02-05 15:06:37 +0000
committeralondria2008-02-05 15:06:37 +0000
commit36f7a087e6f101f1d74659621afc460c974a8dc9 (patch)
tree6697a2b48cca5b3c1127a9e3347641c49bff58dd /OpenSim/Region/ScriptEngine/Common/LSL_Types.cs
parentSmall refactoring on Terrain Update sending, so that other code can force ter... (diff)
downloadopensim-SC_OLD-36f7a087e6f101f1d74659621afc460c974a8dc9.zip
opensim-SC_OLD-36f7a087e6f101f1d74659621afc460c974a8dc9.tar.gz
opensim-SC_OLD-36f7a087e6f101f1d74659621afc460c974a8dc9.tar.bz2
opensim-SC_OLD-36f7a087e6f101f1d74659621afc460c974a8dc9.tar.xz
Added explicit Quaternion->string and list->string conversions.
Some preliminary work on llSetStatus and llGetStatus.
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/ScriptEngine/Common/LSL_Types.cs21
1 files changed, 21 insertions, 0 deletions
diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_Types.cs b/OpenSim/Region/ScriptEngine/Common/LSL_Types.cs
index fc0e282..1611b74 100644
--- a/OpenSim/Region/ScriptEngine/Common/LSL_Types.cs
+++ b/OpenSim/Region/ScriptEngine/Common/LSL_Types.cs
@@ -305,6 +305,11 @@ namespace OpenSim.Region.ScriptEngine.Common
305 return "<" + x.ToString() + ", " + y.ToString() + ", " + z.ToString() + ", " + s.ToString() + ">"; 305 return "<" + x.ToString() + ", " + y.ToString() + ", " + z.ToString() + ", " + s.ToString() + ">";
306 } 306 }
307 307
308 public static explicit operator string(Quaternion r)
309 {
310 return "<" + r.x.ToString() + ", " + r.y.ToString() + ", " + r.z.ToString() + ", " + r.s.ToString() + ">";
311 }
312
308 public static bool operator ==(Quaternion lhs, Quaternion rhs) 313 public static bool operator ==(Quaternion lhs, Quaternion rhs)
309 { 314 {
310 // Return true if the fields match: 315 // Return true if the fields match:
@@ -454,6 +459,8 @@ namespace OpenSim.Region.ScriptEngine.Common
454 return output; 459 return output;
455 } 460 }
456 461
462
463
457 public override string ToString() 464 public override string ToString()
458 { 465 {
459 string output; 466 string output;
@@ -470,6 +477,20 @@ namespace OpenSim.Region.ScriptEngine.Common
470 477
471 } 478 }
472 479
480 public static explicit operator string(list l)
481 {
482 string output;
483 output = String.Empty;
484 if (l.m_data.Length == 0)
485 {
486 return String.Empty;
487 }
488 foreach (object o in l.m_data)
489 {
490 output = output + o.ToString();
491 }
492 return output;
493 }
473 } 494 }
474 495
475 // 496 //