diff options
author | Charles Krinke | 2008-07-10 00:40:38 +0000 |
---|---|---|
committer | Charles Krinke | 2008-07-10 00:40:38 +0000 |
commit | c9a7bf7e58b41920b3d3152950a3bca5a1b1cf4c (patch) | |
tree | 7122b06f15518e81003a7b0155106ac505661146 /OpenSim | |
parent | added convenience makefile and nant-color script. I've had these (diff) | |
download | opensim-SC-c9a7bf7e58b41920b3d3152950a3bca5a1b1cf4c.zip opensim-SC-c9a7bf7e58b41920b3d3152950a3bca5a1b1cf4c.tar.gz opensim-SC-c9a7bf7e58b41920b3d3152950a3bca5a1b1cf4c.tar.bz2 opensim-SC-c9a7bf7e58b41920b3d3152950a3bca5a1b1cf4c.tar.xz |
Mantis#1673. Thank you kindly, Matth for a patch that:
LSLInteger + literal integer is not an LSLInteger.
The included patch fixes the issue: LSLInteger + literal
integer is not an LSLInteger (also fixed for -,*,/)
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Common/LSL_Types.cs | 20 | ||||
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs | 20 |
2 files changed, 40 insertions, 0 deletions
diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_Types.cs b/OpenSim/Region/ScriptEngine/Common/LSL_Types.cs index 1e2e573..eb13f45 100644 --- a/OpenSim/Region/ScriptEngine/Common/LSL_Types.cs +++ b/OpenSim/Region/ScriptEngine/Common/LSL_Types.cs | |||
@@ -1292,6 +1292,26 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
1292 | bool ret = i1.value != i2.value; | 1292 | bool ret = i1.value != i2.value; |
1293 | return ret; | 1293 | return ret; |
1294 | } | 1294 | } |
1295 | |||
1296 | static public LSLInteger operator +(LSLInteger i1, int i2) | ||
1297 | { | ||
1298 | return new LSLInteger(i1.value + i2); | ||
1299 | } | ||
1300 | |||
1301 | static public LSLInteger operator -(LSLInteger i1, int i2) | ||
1302 | { | ||
1303 | return new LSLInteger(i1.value - i2); | ||
1304 | } | ||
1305 | |||
1306 | static public LSLInteger operator *(LSLInteger i1, int i2) | ||
1307 | { | ||
1308 | return new LSLInteger(i1.value * i2); | ||
1309 | } | ||
1310 | |||
1311 | static public LSLInteger operator /(LSLInteger i1, int i2) | ||
1312 | { | ||
1313 | return new LSLInteger(i1.value / i2); | ||
1314 | } | ||
1295 | 1315 | ||
1296 | public override bool Equals(Object o) | 1316 | public override bool Equals(Object o) |
1297 | { | 1317 | { |
diff --git a/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs b/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs index f08534c53..7ababb4 100644 --- a/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs +++ b/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs | |||
@@ -1320,6 +1320,26 @@ namespace OpenSim.Region.ScriptEngine.Shared | |||
1320 | bool ret = i1.value != i2.value; | 1320 | bool ret = i1.value != i2.value; |
1321 | return ret; | 1321 | return ret; |
1322 | } | 1322 | } |
1323 | |||
1324 | static public LSLInteger operator +(LSLInteger i1, int i2) | ||
1325 | { | ||
1326 | return new LSLInteger(i1.value + i2); | ||
1327 | } | ||
1328 | |||
1329 | static public LSLInteger operator -(LSLInteger i1, int i2) | ||
1330 | { | ||
1331 | return new LSLInteger(i1.value - i2); | ||
1332 | } | ||
1333 | |||
1334 | static public LSLInteger operator *(LSLInteger i1, int i2) | ||
1335 | { | ||
1336 | return new LSLInteger(i1.value * i2); | ||
1337 | } | ||
1338 | |||
1339 | static public LSLInteger operator /(LSLInteger i1, int i2) | ||
1340 | { | ||
1341 | return new LSLInteger(i1.value / i2); | ||
1342 | } | ||
1323 | 1343 | ||
1324 | static public LSLInteger operator &(LSLInteger i1, LSLInteger i2) | 1344 | static public LSLInteger operator &(LSLInteger i1, LSLInteger i2) |
1325 | { | 1345 | { |