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 -,*,/)
0.6.0-stable
Charles Krinke 2008-07-10 00:40:38 +00:00
rodič 9a06bf47b9
revize c9a7bf7e58
2 změnil soubory, kde provedl 40 přidání a 0 odebrání

Zobrazit soubor

@ -1292,6 +1292,26 @@ namespace OpenSim.Region.ScriptEngine.Common
bool ret = i1.value != i2.value; bool ret = i1.value != i2.value;
return ret; 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) public override bool Equals(Object o)
{ {

Zobrazit soubor

@ -1320,6 +1320,26 @@ namespace OpenSim.Region.ScriptEngine.Shared
bool ret = i1.value != i2.value; bool ret = i1.value != i2.value;
return ret; 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) static public LSLInteger operator &(LSLInteger i1, LSLInteger i2)
{ {