aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Common
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Common')
-rw-r--r--OpenSim/Region/ScriptEngine/Common/BuiltIn_Commands_BaseClass.cs4
-rw-r--r--OpenSim/Region/ScriptEngine/Common/LSL_Types.cs24
2 files changed, 26 insertions, 2 deletions
diff --git a/OpenSim/Region/ScriptEngine/Common/BuiltIn_Commands_BaseClass.cs b/OpenSim/Region/ScriptEngine/Common/BuiltIn_Commands_BaseClass.cs
index 9dd7e01..575cb43 100644
--- a/OpenSim/Region/ScriptEngine/Common/BuiltIn_Commands_BaseClass.cs
+++ b/OpenSim/Region/ScriptEngine/Common/BuiltIn_Commands_BaseClass.cs
@@ -2421,7 +2421,7 @@ namespace OpenSim.Region.ScriptEngine.Common
2421 public const int OBJECT_CREATOR = 8; 2421 public const int OBJECT_CREATOR = 8;
2422 2422
2423 // Can not be public const? 2423 // Can not be public const?
2424 public vector ZERO_VECTOR = new vector(0.0, 0.0, 0.0); 2424 public static readonly vector ZERO_VECTOR = new vector(0.0, 0.0, 0.0);
2425 public rotation ZERO_ROTATION = new rotation(0.0, 0, 0.0, 1.0); 2425 public static readonly rotation ZERO_ROTATION = new rotation(0.0, 0, 0.0, 1.0);
2426 } 2426 }
2427} 2427}
diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_Types.cs b/OpenSim/Region/ScriptEngine/Common/LSL_Types.cs
index b8a4a4d..21acac2 100644
--- a/OpenSim/Region/ScriptEngine/Common/LSL_Types.cs
+++ b/OpenSim/Region/ScriptEngine/Common/LSL_Types.cs
@@ -1186,6 +1186,14 @@ namespace OpenSim.Region.ScriptEngine.Common
1186 return new LSLString(f); 1186 return new LSLString(f);
1187 } 1187 }
1188 1188
1189 static public explicit operator LSLString(bool b)
1190 {
1191 if (b)
1192 return new LSLString("1");
1193 else
1194 return new LSLString("0");
1195 }
1196
1189 public static implicit operator Vector3(LSLString s) 1197 public static implicit operator Vector3(LSLString s)
1190 { 1198 {
1191 return new Vector3(s.m_string); 1199 return new Vector3(s.m_string);
@@ -1303,6 +1311,14 @@ namespace OpenSim.Region.ScriptEngine.Common
1303 return new LSLInteger(f.value); 1311 return new LSLInteger(f.value);
1304 } 1312 }
1305 1313
1314 static public implicit operator LSLInteger(bool b)
1315 {
1316 if (b)
1317 return new LSLInteger(1);
1318 else
1319 return new LSLInteger(0);
1320 }
1321
1306 static public bool operator ==(LSLInteger i1, LSLInteger i2) 1322 static public bool operator ==(LSLInteger i1, LSLInteger i2)
1307 { 1323 {
1308 bool ret = i1.value == i2.value; 1324 bool ret = i1.value == i2.value;
@@ -1481,6 +1497,14 @@ namespace OpenSim.Region.ScriptEngine.Common
1481 return new LSLFloat(d); 1497 return new LSLFloat(d);
1482 } 1498 }
1483 1499
1500 static public implicit operator LSLFloat(bool b)
1501 {
1502 if (b)
1503 return new LSLFloat(1.0);
1504 else
1505 return new LSLFloat(0.0);
1506 }
1507
1484 static public bool operator ==(LSLFloat f1, LSLFloat f2) 1508 static public bool operator ==(LSLFloat f1, LSLFloat f2)
1485 { 1509 {
1486 return f1.value == f2.value; 1510 return f1.value == f2.value;