diff options
author | lbsa71 | 2008-06-24 21:09:49 +0000 |
---|---|---|
committer | lbsa71 | 2008-06-24 21:09:49 +0000 |
commit | 6b7930104bdb845d3b9c085dc04f52b6446f23b1 (patch) | |
tree | 05ee45781a455817fa400bb99f30f4d19d4eb1f8 /OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs | |
parent | based on positive feedback on performance of making keys fixed length (diff) | |
download | opensim-SC_OLD-6b7930104bdb845d3b9c085dc04f52b6446f23b1.zip opensim-SC_OLD-6b7930104bdb845d3b9c085dc04f52b6446f23b1.tar.gz opensim-SC_OLD-6b7930104bdb845d3b9c085dc04f52b6446f23b1.tar.bz2 opensim-SC_OLD-6b7930104bdb845d3b9c085dc04f52b6446f23b1.tar.xz |
* Applied patch from Melanie, mantis issue #1581 - "Refactor LSL language, api and compiler out of XEngine"
"First stage in a major Script Engine refactor, that will result in the LSL implementaions ebing reconverged. Not there yet, but one major part is done."
Thank you, Melanie!
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs (renamed from OpenSim/Region/ScriptEngine/XEngine/Script/LSL_Types.cs) | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/OpenSim/Region/ScriptEngine/XEngine/Script/LSL_Types.cs b/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs index 8bd3d73..6b080a0 100644 --- a/OpenSim/Region/ScriptEngine/XEngine/Script/LSL_Types.cs +++ b/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs | |||
@@ -29,7 +29,7 @@ using System; | |||
29 | using System.Collections; | 29 | using System.Collections; |
30 | using System.Text.RegularExpressions; | 30 | using System.Text.RegularExpressions; |
31 | 31 | ||
32 | namespace OpenSim.Region.ScriptEngine.XEngine.Script | 32 | namespace OpenSim.Region.ScriptEngine.Shared |
33 | { | 33 | { |
34 | [Serializable] | 34 | [Serializable] |
35 | public partial class LSL_Types | 35 | public partial class LSL_Types |
@@ -1474,6 +1474,19 @@ namespace OpenSim.Region.ScriptEngine.XEngine.Script | |||
1474 | return f1.value != f2.value; | 1474 | return f1.value != f2.value; |
1475 | } | 1475 | } |
1476 | 1476 | ||
1477 | public override bool Equals(Object o) | ||
1478 | { | ||
1479 | if(!(o is LSLFloat)) | ||
1480 | return false; | ||
1481 | |||
1482 | return value == ((LSLFloat)o).value; | ||
1483 | } | ||
1484 | |||
1485 | public override int GetHashCode() | ||
1486 | { | ||
1487 | return (int)value; | ||
1488 | } | ||
1489 | |||
1477 | static public LSLFloat operator ++(LSLFloat f) | 1490 | static public LSLFloat operator ++(LSLFloat f) |
1478 | { | 1491 | { |
1479 | f.value++; | 1492 | f.value++; |
@@ -1491,12 +1504,6 @@ namespace OpenSim.Region.ScriptEngine.XEngine.Script | |||
1491 | return f.value; | 1504 | return f.value; |
1492 | } | 1505 | } |
1493 | 1506 | ||
1494 | static public explicit operator LSLString(LSLFloat f) | ||
1495 | { | ||
1496 | string v = String.Format("{0:0.000000}", f.value); | ||
1497 | return new LSLString(v); | ||
1498 | } | ||
1499 | |||
1500 | #endregion | 1507 | #endregion |
1501 | 1508 | ||
1502 | #region Overriders | 1509 | #region Overriders |