Fix a number of casting issues in XEngine's API
0.6.0-stable
Melanie Thielker 2008-09-08 11:49:17 +00:00
parent 3f9cc28103
commit 1732baca0e
1 changed files with 24 additions and 24 deletions

View File

@ -5616,7 +5616,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
face = Convert.ToInt32(rules.Data[idx++].ToString()); // holeshape face = Convert.ToInt32(rules.Data[idx++].ToString()); // holeshape
v = new LSL_Types.Vector3(rules.Data[idx++].ToString()); // cut v = new LSL_Types.Vector3(rules.Data[idx++].ToString()); // cut
hollow = (float)Convert.ToDouble(rules.Data[idx++]); hollow = (float)Convert.ToDouble(rules.Data[idx++].ToString());
twist = new LSL_Types.Vector3(rules.Data[idx++].ToString()); twist = new LSL_Types.Vector3(rules.Data[idx++].ToString());
taper_b = new LSL_Types.Vector3(rules.Data[idx++].ToString()); taper_b = new LSL_Types.Vector3(rules.Data[idx++].ToString());
topshear = new LSL_Types.Vector3(rules.Data[idx++].ToString()); topshear = new LSL_Types.Vector3(rules.Data[idx++].ToString());
@ -5630,7 +5630,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
face = Convert.ToInt32(rules.Data[idx++].ToString()); // holeshape face = Convert.ToInt32(rules.Data[idx++].ToString()); // holeshape
v = new LSL_Types.Vector3(rules.Data[idx++].ToString()); // cut v = new LSL_Types.Vector3(rules.Data[idx++].ToString()); // cut
hollow = (float)Convert.ToDouble(rules.Data[idx++]); hollow = (float)Convert.ToDouble(rules.Data[idx++].ToString());
twist = new LSL_Types.Vector3(rules.Data[idx++].ToString()); twist = new LSL_Types.Vector3(rules.Data[idx++].ToString());
taper_b = new LSL_Types.Vector3(rules.Data[idx++].ToString()); taper_b = new LSL_Types.Vector3(rules.Data[idx++].ToString());
topshear = new LSL_Types.Vector3(rules.Data[idx++].ToString()); topshear = new LSL_Types.Vector3(rules.Data[idx++].ToString());
@ -5645,7 +5645,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
face = Convert.ToInt32(rules.Data[idx++].ToString()); // holeshape face = Convert.ToInt32(rules.Data[idx++].ToString()); // holeshape
v = new LSL_Types.Vector3(rules.Data[idx++].ToString()); //cut v = new LSL_Types.Vector3(rules.Data[idx++].ToString()); //cut
hollow = (float)Convert.ToDouble(rules.Data[idx++]); hollow = (float)Convert.ToDouble(rules.Data[idx++].ToString());
twist = new LSL_Types.Vector3(rules.Data[idx++].ToString()); twist = new LSL_Types.Vector3(rules.Data[idx++].ToString());
taper_b = new LSL_Types.Vector3(rules.Data[idx++].ToString()); taper_b = new LSL_Types.Vector3(rules.Data[idx++].ToString());
topshear = new LSL_Types.Vector3(rules.Data[idx++].ToString()); topshear = new LSL_Types.Vector3(rules.Data[idx++].ToString());
@ -5659,7 +5659,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
face = Convert.ToInt32(rules.Data[idx++].ToString()); // holeshape face = Convert.ToInt32(rules.Data[idx++].ToString()); // holeshape
v = new LSL_Types.Vector3(rules.Data[idx++].ToString()); // cut v = new LSL_Types.Vector3(rules.Data[idx++].ToString()); // cut
hollow = (float)Convert.ToDouble(rules.Data[idx++]); hollow = (float)Convert.ToDouble(rules.Data[idx++].ToString());
twist = new LSL_Types.Vector3(rules.Data[idx++].ToString()); twist = new LSL_Types.Vector3(rules.Data[idx++].ToString());
taper_b = new LSL_Types.Vector3(rules.Data[idx++].ToString()); // dimple taper_b = new LSL_Types.Vector3(rules.Data[idx++].ToString()); // dimple
part.Shape.PathCurve = (byte)Extrusion.Curve1; part.Shape.PathCurve = (byte)Extrusion.Curve1;
@ -5672,15 +5672,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
face = Convert.ToInt32(rules.Data[idx++].ToString()); // holeshape face = Convert.ToInt32(rules.Data[idx++].ToString()); // holeshape
v = new LSL_Types.Vector3(rules.Data[idx++].ToString()); //cut v = new LSL_Types.Vector3(rules.Data[idx++].ToString()); //cut
hollow = (float)Convert.ToDouble(rules.Data[idx++]); hollow = (float)Convert.ToDouble(rules.Data[idx++].ToString());
twist = new LSL_Types.Vector3(rules.Data[idx++].ToString()); twist = new LSL_Types.Vector3(rules.Data[idx++].ToString());
holesize = new LSL_Types.Vector3(rules.Data[idx++].ToString()); holesize = new LSL_Types.Vector3(rules.Data[idx++].ToString());
topshear = new LSL_Types.Vector3(rules.Data[idx++].ToString()); topshear = new LSL_Types.Vector3(rules.Data[idx++].ToString());
profilecut = new LSL_Types.Vector3(rules.Data[idx++].ToString()); profilecut = new LSL_Types.Vector3(rules.Data[idx++].ToString());
taper_b = new LSL_Types.Vector3(rules.Data[idx++].ToString()); // taper_a taper_b = new LSL_Types.Vector3(rules.Data[idx++].ToString()); // taper_a
revolutions = (float)Convert.ToDouble(rules.Data[idx++]); revolutions = (float)Convert.ToDouble(rules.Data[idx++].ToString());
radiusoffset = (float)Convert.ToDouble(rules.Data[idx++]); radiusoffset = (float)Convert.ToDouble(rules.Data[idx++].ToString());
skew = (float)Convert.ToDouble(rules.Data[idx++]); skew = (float)Convert.ToDouble(rules.Data[idx++].ToString());
part.Shape.PathCurve = (byte)Extrusion.Curve1; part.Shape.PathCurve = (byte)Extrusion.Curve1;
SetPrimitiveShapeParams(part, face, v, hollow, twist, holesize, topshear, profilecut, taper_b, revolutions, radiusoffset, skew, 0); SetPrimitiveShapeParams(part, face, v, hollow, twist, holesize, topshear, profilecut, taper_b, revolutions, radiusoffset, skew, 0);
break; break;
@ -5691,15 +5691,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
face = Convert.ToInt32(rules.Data[idx++].ToString()); // holeshape face = Convert.ToInt32(rules.Data[idx++].ToString()); // holeshape
v = new LSL_Types.Vector3(rules.Data[idx++].ToString()); //cut v = new LSL_Types.Vector3(rules.Data[idx++].ToString()); //cut
hollow = (float)Convert.ToDouble(rules.Data[idx++]); hollow = (float)Convert.ToDouble(rules.Data[idx++].ToString());
twist = new LSL_Types.Vector3(rules.Data[idx++].ToString()); twist = new LSL_Types.Vector3(rules.Data[idx++].ToString());
holesize = new LSL_Types.Vector3(rules.Data[idx++].ToString()); holesize = new LSL_Types.Vector3(rules.Data[idx++].ToString());
topshear = new LSL_Types.Vector3(rules.Data[idx++].ToString()); topshear = new LSL_Types.Vector3(rules.Data[idx++].ToString());
profilecut = new LSL_Types.Vector3(rules.Data[idx++].ToString()); profilecut = new LSL_Types.Vector3(rules.Data[idx++].ToString());
taper_b = new LSL_Types.Vector3(rules.Data[idx++].ToString()); // taper_a taper_b = new LSL_Types.Vector3(rules.Data[idx++].ToString()); // taper_a
revolutions = (float)Convert.ToDouble(rules.Data[idx++]); revolutions = (float)Convert.ToDouble(rules.Data[idx++].ToString());
radiusoffset = (float)Convert.ToDouble(rules.Data[idx++]); radiusoffset = (float)Convert.ToDouble(rules.Data[idx++].ToString());
skew = (float)Convert.ToDouble(rules.Data[idx++]); skew = (float)Convert.ToDouble(rules.Data[idx++].ToString());
part.Shape.PathCurve = (byte)Extrusion.Curve1; part.Shape.PathCurve = (byte)Extrusion.Curve1;
SetPrimitiveShapeParams(part, face, v, hollow, twist, holesize, topshear, profilecut, taper_b, revolutions, radiusoffset, skew, 1); SetPrimitiveShapeParams(part, face, v, hollow, twist, holesize, topshear, profilecut, taper_b, revolutions, radiusoffset, skew, 1);
break; break;
@ -5710,15 +5710,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
face = Convert.ToInt32(rules.Data[idx++].ToString()); // holeshape face = Convert.ToInt32(rules.Data[idx++].ToString()); // holeshape
v = new LSL_Types.Vector3(rules.Data[idx++].ToString()); //cut v = new LSL_Types.Vector3(rules.Data[idx++].ToString()); //cut
hollow = (float)Convert.ToDouble(rules.Data[idx++]); hollow = (float)Convert.ToDouble(rules.Data[idx++].ToString());
twist = new LSL_Types.Vector3(rules.Data[idx++].ToString()); twist = new LSL_Types.Vector3(rules.Data[idx++].ToString());
holesize = new LSL_Types.Vector3(rules.Data[idx++].ToString()); holesize = new LSL_Types.Vector3(rules.Data[idx++].ToString());
topshear = new LSL_Types.Vector3(rules.Data[idx++].ToString()); topshear = new LSL_Types.Vector3(rules.Data[idx++].ToString());
profilecut = new LSL_Types.Vector3(rules.Data[idx++].ToString()); profilecut = new LSL_Types.Vector3(rules.Data[idx++].ToString());
taper_b = new LSL_Types.Vector3(rules.Data[idx++].ToString()); // taper_a taper_b = new LSL_Types.Vector3(rules.Data[idx++].ToString()); // taper_a
revolutions = (float)Convert.ToDouble(rules.Data[idx++]); revolutions = (float)Convert.ToDouble(rules.Data[idx++].ToString());
radiusoffset = (float)Convert.ToDouble(rules.Data[idx++]); radiusoffset = (float)Convert.ToDouble(rules.Data[idx++].ToString());
skew = (float)Convert.ToDouble(rules.Data[idx++]); skew = (float)Convert.ToDouble(rules.Data[idx++].ToString());
part.Shape.PathCurve = (byte)Extrusion.Curve1; part.Shape.PathCurve = (byte)Extrusion.Curve1;
SetPrimitiveShapeParams(part, face, v, hollow, twist, holesize, topshear, profilecut, taper_b, revolutions, radiusoffset, skew, 3); SetPrimitiveShapeParams(part, face, v, hollow, twist, holesize, topshear, profilecut, taper_b, revolutions, radiusoffset, skew, 3);
break; break;
@ -5744,7 +5744,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
string tex=rules.Data[idx++].ToString(); string tex=rules.Data[idx++].ToString();
LSL_Types.Vector3 repeats=new LSL_Types.Vector3(rules.Data[idx++].ToString()); LSL_Types.Vector3 repeats=new LSL_Types.Vector3(rules.Data[idx++].ToString());
LSL_Types.Vector3 offsets=new LSL_Types.Vector3(rules.Data[idx++].ToString()); LSL_Types.Vector3 offsets=new LSL_Types.Vector3(rules.Data[idx++].ToString());
double rotation=Convert.ToDouble(rules.Data[idx++]); double rotation=Convert.ToDouble(rules.Data[idx++].ToString());
SetTexture(part, tex, face); SetTexture(part, tex, face);
ScaleTexture(part, repeats.x, repeats.y, face); ScaleTexture(part, repeats.x, repeats.y, face);
@ -5759,7 +5759,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
face=Convert.ToInt32(rules.Data[idx++].ToString()); face=Convert.ToInt32(rules.Data[idx++].ToString());
LSL_Types.Vector3 color=new LSL_Types.Vector3(rules.Data[idx++].ToString()); LSL_Types.Vector3 color=new LSL_Types.Vector3(rules.Data[idx++].ToString());
double alpha=Convert.ToDouble(rules.Data[idx++]); double alpha=Convert.ToDouble(rules.Data[idx++].ToString());
SetColor(part, color, face); SetColor(part, color, face);
SetAlpha(part, alpha, face); SetAlpha(part, alpha, face);
@ -5785,9 +5785,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
return; return;
LSL_Types.LSLInteger light = new LSL_Types.LSLInteger(rules.Data[idx++].ToString()); LSL_Types.LSLInteger light = new LSL_Types.LSLInteger(rules.Data[idx++].ToString());
LSL_Types.Vector3 lightcolor = new LSL_Types.Vector3(rules.Data[idx++].ToString()); LSL_Types.Vector3 lightcolor = new LSL_Types.Vector3(rules.Data[idx++].ToString());
float intensity = (float)Convert.ToDouble(rules.Data[idx++]); float intensity = (float)Convert.ToDouble(rules.Data[idx++].ToString());
float radius = (float)Convert.ToDouble(rules.Data[idx++]); float radius = (float)Convert.ToDouble(rules.Data[idx++].ToString());
float falloff = (float)Convert.ToDouble(rules.Data[idx++]); float falloff = (float)Convert.ToDouble(rules.Data[idx++].ToString());
SetPointLight(part, light, lightcolor, intensity, radius, falloff); SetPointLight(part, light, lightcolor, intensity, radius, falloff);
@ -5796,7 +5796,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
if (remain < 2) if (remain < 2)
return; return;
face = Convert.ToInt32(rules.Data[idx++].ToString()); face = Convert.ToInt32(rules.Data[idx++].ToString());
float glow = (float)Convert.ToDouble(rules.Data[idx++]); float glow = (float)Convert.ToDouble(rules.Data[idx++].ToString());
SetGlow(part, face, glow); SetGlow(part, face, glow);
@ -5806,7 +5806,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
return; return;
face = Convert.ToInt32(rules.Data[idx++].ToString()); face = Convert.ToInt32(rules.Data[idx++].ToString());
int shiny = Convert.ToInt32(rules.Data[idx++].ToString()); int shiny = Convert.ToInt32(rules.Data[idx++].ToString());
Bumpiness bump = (Bumpiness)Convert.ToByte(rules.Data[idx++]); Bumpiness bump = (Bumpiness)Convert.ToByte(rules.Data[idx++].ToString());
SetShiny(part, face, shiny, bump); SetShiny(part, face, shiny, bump);
@ -5831,7 +5831,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
{ {
/* Unhandled at this time - sends "Unhandled" message /* Unhandled at this time - sends "Unhandled" message
will enable when available will enable when available
byte material = (byte)Convert.ToByte( rules.Data[idx++]); byte material = (byte)Convert.ToByte( rules.Data[idx++].ToString());
part.Material = material; part.Material = material;
*/ */
return; return;