From c9a7bf7e58b41920b3d3152950a3bca5a1b1cf4c Mon Sep 17 00:00:00 2001 From: Charles Krinke Date: Thu, 10 Jul 2008 00:40:38 +0000 Subject: [PATCH] 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 -,*,/) --- .../Region/ScriptEngine/Common/LSL_Types.cs | 20 +++++++++++++++++++ .../Region/ScriptEngine/Shared/LSL_Types.cs | 20 +++++++++++++++++++ 2 files changed, 40 insertions(+) diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_Types.cs b/OpenSim/Region/ScriptEngine/Common/LSL_Types.cs index 1e2e5733d1..eb13f45944 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 bool ret = i1.value != i2.value; return ret; } + + static public LSLInteger operator +(LSLInteger i1, int i2) + { + return new LSLInteger(i1.value + i2); + } + + static public LSLInteger operator -(LSLInteger i1, int i2) + { + return new LSLInteger(i1.value - i2); + } + + static public LSLInteger operator *(LSLInteger i1, int i2) + { + return new LSLInteger(i1.value * i2); + } + + static public LSLInteger operator /(LSLInteger i1, int i2) + { + return new LSLInteger(i1.value / i2); + } public override bool Equals(Object o) { diff --git a/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs b/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs index f08534c532..7ababb4659 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 bool ret = i1.value != i2.value; return ret; } + + static public LSLInteger operator +(LSLInteger i1, int i2) + { + return new LSLInteger(i1.value + i2); + } + + static public LSLInteger operator -(LSLInteger i1, int i2) + { + return new LSLInteger(i1.value - i2); + } + + static public LSLInteger operator *(LSLInteger i1, int i2) + { + return new LSLInteger(i1.value * i2); + } + + static public LSLInteger operator /(LSLInteger i1, int i2) + { + return new LSLInteger(i1.value / i2); + } static public LSLInteger operator &(LSLInteger i1, LSLInteger i2) {