Raw int numbers (ex.LSL Constants) are displayed like "1.000000" when type cast to string

bulletsim
Makopoppo 2011-07-05 22:19:26 +09:00 committed by Justin Clark-Casey (justincc)
parent f680c13495
commit df586c9d25
1 changed files with 11 additions and 0 deletions

View File

@ -1397,6 +1397,12 @@ namespace OpenSim.Region.ScriptEngine.Shared
m_string=s;
}
public LSLString(int i)
{
string s = String.Format("{0}", i);
m_string = s;
}
public LSLString(LSLInteger i)
{
string s = String.Format("{0}", i);
@ -1470,6 +1476,11 @@ namespace OpenSim.Region.ScriptEngine.Shared
return new LSLString(d);
}
static public explicit operator LSLString(int i)
{
return new LSLString(i);
}
public static explicit operator LSLString(LSLFloat f)
{
return new LSLString(f);