Thannk you, ralphos, for a patch to clean up list item type handling
and add a missing explicit cast in Shared/
This commit is contained in:
Melanie Thielker
2008-09-03 18:57:06 +00:00
parent cf7f3df4c2
commit ef27c8817f
4 changed files with 103 additions and 17 deletions

View File

@@ -5721,13 +5721,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
if (remain < 7)
return;
LSL_Types.LSLInteger flexi = new LSL_Types.LSLInteger(rules.Data[idx++].ToString());
int softness = Convert.ToInt32(rules.Data[idx++]);
float gravity = (float)Convert.ToDouble(rules.Data[idx++]);
float friction = (float)Convert.ToDouble(rules.Data[idx++]);
float wind = (float)Convert.ToDouble(rules.Data[idx++]);
float tension = (float)Convert.ToDouble(rules.Data[idx++]);
LSL_Types.Vector3 force =new LSL_Types.Vector3(rules.Data[idx++].ToString());
bool flexi = (LSL_Types.LSLInteger)rules.Data[idx++];
int softness = (LSL_Types.LSLInteger)rules.Data[idx++];
float gravity = (float)(LSL_Types.LSLFloat)rules.Data[idx++];
float friction = (float)(LSL_Types.LSLFloat)rules.Data[idx++];
float wind = (float)(LSL_Types.LSLFloat)rules.Data[idx++];
float tension = (float)(LSL_Types.LSLFloat)rules.Data[idx++];
LSL_Types.Vector3 force = (LSL_Types.Vector3)rules.Data[idx++];
SetFlexi(part, flexi, softness, gravity, friction, wind, tension, force);

View File

@@ -1569,9 +1569,14 @@ namespace OpenSim.Region.ScriptEngine.Shared
#region Operators
static public explicit operator float(LSLFloat f)
{
return (float)f.value;
}
static public explicit operator int(LSLFloat f)
{
return (int)f.value;
return (int)f.value;
}
static public explicit operator uint(LSLFloat f)