diff options
author | Mike Mazur | 2008-07-18 07:52:44 +0000 |
---|---|---|
committer | Mike Mazur | 2008-07-18 07:52:44 +0000 |
commit | 8b613e677f269237bcbf2ddc2b1b826c18f514c7 (patch) | |
tree | 8d1bd6cab4c65014f6f23eed7eefc84a63b6c6a7 /OpenSim/Region | |
parent | Thanks, sempuki, for a patch that moves all grid plugins to new PluginLoader ... (diff) | |
download | opensim-SC-8b613e677f269237bcbf2ddc2b1b826c18f514c7.zip opensim-SC-8b613e677f269237bcbf2ddc2b1b826c18f514c7.tar.gz opensim-SC-8b613e677f269237bcbf2ddc2b1b826c18f514c7.tar.bz2 opensim-SC-8b613e677f269237bcbf2ddc2b1b826c18f514c7.tar.xz |
Implement cast to LSL_Types.LSLInteger from double. Fix issue 1770.
Diffstat (limited to 'OpenSim/Region')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Common/LSL_Types.cs | 5 | ||||
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs | 5 |
2 files changed, 10 insertions, 0 deletions
diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_Types.cs b/OpenSim/Region/ScriptEngine/Common/LSL_Types.cs index c630c27..be790d6 100644 --- a/OpenSim/Region/ScriptEngine/Common/LSL_Types.cs +++ b/OpenSim/Region/ScriptEngine/Common/LSL_Types.cs | |||
@@ -1281,6 +1281,11 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
1281 | return new LSLInteger(u); | 1281 | return new LSLInteger(u); |
1282 | } | 1282 | } |
1283 | 1283 | ||
1284 | static public implicit operator LSLInteger(double d) | ||
1285 | { | ||
1286 | return new LSLInteger(d); | ||
1287 | } | ||
1288 | |||
1284 | static public bool operator ==(LSLInteger i1, LSLInteger i2) | 1289 | static public bool operator ==(LSLInteger i1, LSLInteger i2) |
1285 | { | 1290 | { |
1286 | bool ret = i1.value == i2.value; | 1291 | bool ret = i1.value == i2.value; |
diff --git a/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs b/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs index f71d584..0cddf36 100644 --- a/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs +++ b/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs | |||
@@ -1309,6 +1309,11 @@ namespace OpenSim.Region.ScriptEngine.Shared | |||
1309 | return new LSLInteger(u); | 1309 | return new LSLInteger(u); |
1310 | } | 1310 | } |
1311 | 1311 | ||
1312 | static public implicit operator LSLInteger(double d) | ||
1313 | { | ||
1314 | return new LSLInteger(d); | ||
1315 | } | ||
1316 | |||
1312 | static public bool operator ==(LSLInteger i1, LSLInteger i2) | 1317 | static public bool operator ==(LSLInteger i1, LSLInteger i2) |
1313 | { | 1318 | { |
1314 | bool ret = i1.value == i2.value; | 1319 | bool ret = i1.value == i2.value; |