mirror of
https://github.com/opensim/opensim.git
synced 2026-08-04 16:22:50 +08:00
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 -,*,/)
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user