diff options
author | Melanie Thielker | 2008-09-08 11:49:17 +0000 |
---|---|---|
committer | Melanie Thielker | 2008-09-08 11:49:17 +0000 |
commit | 1732baca0e9afcf09ac36a2387887997fbeab341 (patch) | |
tree | 8c1671bb78cb903f7441c90f633dc3d6c1248215 | |
parent | fix: warnings from libomv (diff) | |
download | opensim-SC_OLD-1732baca0e9afcf09ac36a2387887997fbeab341.zip opensim-SC_OLD-1732baca0e9afcf09ac36a2387887997fbeab341.tar.gz opensim-SC_OLD-1732baca0e9afcf09ac36a2387887997fbeab341.tar.bz2 opensim-SC_OLD-1732baca0e9afcf09ac36a2387887997fbeab341.tar.xz |
Mantis #2145
Fix a number of casting issues in XEngine's API
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 38d9728..1159553 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -5616,7 +5616,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
5616 | 5616 | ||
5617 | face = Convert.ToInt32(rules.Data[idx++].ToString()); // holeshape | 5617 | face = Convert.ToInt32(rules.Data[idx++].ToString()); // holeshape |
5618 | v = new LSL_Types.Vector3(rules.Data[idx++].ToString()); // cut | 5618 | v = new LSL_Types.Vector3(rules.Data[idx++].ToString()); // cut |
5619 | hollow = (float)Convert.ToDouble(rules.Data[idx++]); | 5619 | hollow = (float)Convert.ToDouble(rules.Data[idx++].ToString()); |
5620 | twist = new LSL_Types.Vector3(rules.Data[idx++].ToString()); | 5620 | twist = new LSL_Types.Vector3(rules.Data[idx++].ToString()); |
5621 | taper_b = new LSL_Types.Vector3(rules.Data[idx++].ToString()); | 5621 | taper_b = new LSL_Types.Vector3(rules.Data[idx++].ToString()); |
5622 | topshear = new LSL_Types.Vector3(rules.Data[idx++].ToString()); | 5622 | topshear = new LSL_Types.Vector3(rules.Data[idx++].ToString()); |
@@ -5630,7 +5630,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
5630 | 5630 | ||
5631 | face = Convert.ToInt32(rules.Data[idx++].ToString()); // holeshape | 5631 | face = Convert.ToInt32(rules.Data[idx++].ToString()); // holeshape |
5632 | v = new LSL_Types.Vector3(rules.Data[idx++].ToString()); // cut | 5632 | v = new LSL_Types.Vector3(rules.Data[idx++].ToString()); // cut |
5633 | hollow = (float)Convert.ToDouble(rules.Data[idx++]); | 5633 | hollow = (float)Convert.ToDouble(rules.Data[idx++].ToString()); |
5634 | twist = new LSL_Types.Vector3(rules.Data[idx++].ToString()); | 5634 | twist = new LSL_Types.Vector3(rules.Data[idx++].ToString()); |
5635 | taper_b = new LSL_Types.Vector3(rules.Data[idx++].ToString()); | 5635 | taper_b = new LSL_Types.Vector3(rules.Data[idx++].ToString()); |
5636 | topshear = new LSL_Types.Vector3(rules.Data[idx++].ToString()); | 5636 | topshear = new LSL_Types.Vector3(rules.Data[idx++].ToString()); |
@@ -5645,7 +5645,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
5645 | 5645 | ||
5646 | face = Convert.ToInt32(rules.Data[idx++].ToString()); // holeshape | 5646 | face = Convert.ToInt32(rules.Data[idx++].ToString()); // holeshape |
5647 | v = new LSL_Types.Vector3(rules.Data[idx++].ToString()); //cut | 5647 | v = new LSL_Types.Vector3(rules.Data[idx++].ToString()); //cut |
5648 | hollow = (float)Convert.ToDouble(rules.Data[idx++]); | 5648 | hollow = (float)Convert.ToDouble(rules.Data[idx++].ToString()); |
5649 | twist = new LSL_Types.Vector3(rules.Data[idx++].ToString()); | 5649 | twist = new LSL_Types.Vector3(rules.Data[idx++].ToString()); |
5650 | taper_b = new LSL_Types.Vector3(rules.Data[idx++].ToString()); | 5650 | taper_b = new LSL_Types.Vector3(rules.Data[idx++].ToString()); |
5651 | topshear = new LSL_Types.Vector3(rules.Data[idx++].ToString()); | 5651 | topshear = new LSL_Types.Vector3(rules.Data[idx++].ToString()); |
@@ -5659,7 +5659,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
5659 | 5659 | ||
5660 | face = Convert.ToInt32(rules.Data[idx++].ToString()); // holeshape | 5660 | face = Convert.ToInt32(rules.Data[idx++].ToString()); // holeshape |
5661 | v = new LSL_Types.Vector3(rules.Data[idx++].ToString()); // cut | 5661 | v = new LSL_Types.Vector3(rules.Data[idx++].ToString()); // cut |
5662 | hollow = (float)Convert.ToDouble(rules.Data[idx++]); | 5662 | hollow = (float)Convert.ToDouble(rules.Data[idx++].ToString()); |
5663 | twist = new LSL_Types.Vector3(rules.Data[idx++].ToString()); | 5663 | twist = new LSL_Types.Vector3(rules.Data[idx++].ToString()); |
5664 | taper_b = new LSL_Types.Vector3(rules.Data[idx++].ToString()); // dimple | 5664 | taper_b = new LSL_Types.Vector3(rules.Data[idx++].ToString()); // dimple |
5665 | part.Shape.PathCurve = (byte)Extrusion.Curve1; | 5665 | part.Shape.PathCurve = (byte)Extrusion.Curve1; |
@@ -5672,15 +5672,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
5672 | 5672 | ||
5673 | face = Convert.ToInt32(rules.Data[idx++].ToString()); // holeshape | 5673 | face = Convert.ToInt32(rules.Data[idx++].ToString()); // holeshape |
5674 | v = new LSL_Types.Vector3(rules.Data[idx++].ToString()); //cut | 5674 | v = new LSL_Types.Vector3(rules.Data[idx++].ToString()); //cut |
5675 | hollow = (float)Convert.ToDouble(rules.Data[idx++]); | 5675 | hollow = (float)Convert.ToDouble(rules.Data[idx++].ToString()); |
5676 | twist = new LSL_Types.Vector3(rules.Data[idx++].ToString()); | 5676 | twist = new LSL_Types.Vector3(rules.Data[idx++].ToString()); |
5677 | holesize = new LSL_Types.Vector3(rules.Data[idx++].ToString()); | 5677 | holesize = new LSL_Types.Vector3(rules.Data[idx++].ToString()); |
5678 | topshear = new LSL_Types.Vector3(rules.Data[idx++].ToString()); | 5678 | topshear = new LSL_Types.Vector3(rules.Data[idx++].ToString()); |
5679 | profilecut = new LSL_Types.Vector3(rules.Data[idx++].ToString()); | 5679 | profilecut = new LSL_Types.Vector3(rules.Data[idx++].ToString()); |
5680 | taper_b = new LSL_Types.Vector3(rules.Data[idx++].ToString()); // taper_a | 5680 | taper_b = new LSL_Types.Vector3(rules.Data[idx++].ToString()); // taper_a |
5681 | revolutions = (float)Convert.ToDouble(rules.Data[idx++]); | 5681 | revolutions = (float)Convert.ToDouble(rules.Data[idx++].ToString()); |
5682 | radiusoffset = (float)Convert.ToDouble(rules.Data[idx++]); | 5682 | radiusoffset = (float)Convert.ToDouble(rules.Data[idx++].ToString()); |
5683 | skew = (float)Convert.ToDouble(rules.Data[idx++]); | 5683 | skew = (float)Convert.ToDouble(rules.Data[idx++].ToString()); |
5684 | part.Shape.PathCurve = (byte)Extrusion.Curve1; | 5684 | part.Shape.PathCurve = (byte)Extrusion.Curve1; |
5685 | SetPrimitiveShapeParams(part, face, v, hollow, twist, holesize, topshear, profilecut, taper_b, revolutions, radiusoffset, skew, 0); | 5685 | SetPrimitiveShapeParams(part, face, v, hollow, twist, holesize, topshear, profilecut, taper_b, revolutions, radiusoffset, skew, 0); |
5686 | break; | 5686 | break; |
@@ -5691,15 +5691,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
5691 | 5691 | ||
5692 | face = Convert.ToInt32(rules.Data[idx++].ToString()); // holeshape | 5692 | face = Convert.ToInt32(rules.Data[idx++].ToString()); // holeshape |
5693 | v = new LSL_Types.Vector3(rules.Data[idx++].ToString()); //cut | 5693 | v = new LSL_Types.Vector3(rules.Data[idx++].ToString()); //cut |
5694 | hollow = (float)Convert.ToDouble(rules.Data[idx++]); | 5694 | hollow = (float)Convert.ToDouble(rules.Data[idx++].ToString()); |
5695 | twist = new LSL_Types.Vector3(rules.Data[idx++].ToString()); | 5695 | twist = new LSL_Types.Vector3(rules.Data[idx++].ToString()); |
5696 | holesize = new LSL_Types.Vector3(rules.Data[idx++].ToString()); | 5696 | holesize = new LSL_Types.Vector3(rules.Data[idx++].ToString()); |
5697 | topshear = new LSL_Types.Vector3(rules.Data[idx++].ToString()); | 5697 | topshear = new LSL_Types.Vector3(rules.Data[idx++].ToString()); |
5698 | profilecut = new LSL_Types.Vector3(rules.Data[idx++].ToString()); | 5698 | profilecut = new LSL_Types.Vector3(rules.Data[idx++].ToString()); |
5699 | taper_b = new LSL_Types.Vector3(rules.Data[idx++].ToString()); // taper_a | 5699 | taper_b = new LSL_Types.Vector3(rules.Data[idx++].ToString()); // taper_a |
5700 | revolutions = (float)Convert.ToDouble(rules.Data[idx++]); | 5700 | revolutions = (float)Convert.ToDouble(rules.Data[idx++].ToString()); |
5701 | radiusoffset = (float)Convert.ToDouble(rules.Data[idx++]); | 5701 | radiusoffset = (float)Convert.ToDouble(rules.Data[idx++].ToString()); |
5702 | skew = (float)Convert.ToDouble(rules.Data[idx++]); | 5702 | skew = (float)Convert.ToDouble(rules.Data[idx++].ToString()); |
5703 | part.Shape.PathCurve = (byte)Extrusion.Curve1; | 5703 | part.Shape.PathCurve = (byte)Extrusion.Curve1; |
5704 | SetPrimitiveShapeParams(part, face, v, hollow, twist, holesize, topshear, profilecut, taper_b, revolutions, radiusoffset, skew, 1); | 5704 | SetPrimitiveShapeParams(part, face, v, hollow, twist, holesize, topshear, profilecut, taper_b, revolutions, radiusoffset, skew, 1); |
5705 | break; | 5705 | break; |
@@ -5710,15 +5710,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
5710 | 5710 | ||
5711 | face = Convert.ToInt32(rules.Data[idx++].ToString()); // holeshape | 5711 | face = Convert.ToInt32(rules.Data[idx++].ToString()); // holeshape |
5712 | v = new LSL_Types.Vector3(rules.Data[idx++].ToString()); //cut | 5712 | v = new LSL_Types.Vector3(rules.Data[idx++].ToString()); //cut |
5713 | hollow = (float)Convert.ToDouble(rules.Data[idx++]); | 5713 | hollow = (float)Convert.ToDouble(rules.Data[idx++].ToString()); |
5714 | twist = new LSL_Types.Vector3(rules.Data[idx++].ToString()); | 5714 | twist = new LSL_Types.Vector3(rules.Data[idx++].ToString()); |
5715 | holesize = new LSL_Types.Vector3(rules.Data[idx++].ToString()); | 5715 | holesize = new LSL_Types.Vector3(rules.Data[idx++].ToString()); |
5716 | topshear = new LSL_Types.Vector3(rules.Data[idx++].ToString()); | 5716 | topshear = new LSL_Types.Vector3(rules.Data[idx++].ToString()); |
5717 | profilecut = new LSL_Types.Vector3(rules.Data[idx++].ToString()); | 5717 | profilecut = new LSL_Types.Vector3(rules.Data[idx++].ToString()); |
5718 | taper_b = new LSL_Types.Vector3(rules.Data[idx++].ToString()); // taper_a | 5718 | taper_b = new LSL_Types.Vector3(rules.Data[idx++].ToString()); // taper_a |
5719 | revolutions = (float)Convert.ToDouble(rules.Data[idx++]); | 5719 | revolutions = (float)Convert.ToDouble(rules.Data[idx++].ToString()); |
5720 | radiusoffset = (float)Convert.ToDouble(rules.Data[idx++]); | 5720 | radiusoffset = (float)Convert.ToDouble(rules.Data[idx++].ToString()); |
5721 | skew = (float)Convert.ToDouble(rules.Data[idx++]); | 5721 | skew = (float)Convert.ToDouble(rules.Data[idx++].ToString()); |
5722 | part.Shape.PathCurve = (byte)Extrusion.Curve1; | 5722 | part.Shape.PathCurve = (byte)Extrusion.Curve1; |
5723 | SetPrimitiveShapeParams(part, face, v, hollow, twist, holesize, topshear, profilecut, taper_b, revolutions, radiusoffset, skew, 3); | 5723 | SetPrimitiveShapeParams(part, face, v, hollow, twist, holesize, topshear, profilecut, taper_b, revolutions, radiusoffset, skew, 3); |
5724 | break; | 5724 | break; |
@@ -5744,7 +5744,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
5744 | string tex=rules.Data[idx++].ToString(); | 5744 | string tex=rules.Data[idx++].ToString(); |
5745 | LSL_Types.Vector3 repeats=new LSL_Types.Vector3(rules.Data[idx++].ToString()); | 5745 | LSL_Types.Vector3 repeats=new LSL_Types.Vector3(rules.Data[idx++].ToString()); |
5746 | LSL_Types.Vector3 offsets=new LSL_Types.Vector3(rules.Data[idx++].ToString()); | 5746 | LSL_Types.Vector3 offsets=new LSL_Types.Vector3(rules.Data[idx++].ToString()); |
5747 | double rotation=Convert.ToDouble(rules.Data[idx++]); | 5747 | double rotation=Convert.ToDouble(rules.Data[idx++].ToString()); |
5748 | 5748 | ||
5749 | SetTexture(part, tex, face); | 5749 | SetTexture(part, tex, face); |
5750 | ScaleTexture(part, repeats.x, repeats.y, face); | 5750 | ScaleTexture(part, repeats.x, repeats.y, face); |
@@ -5759,7 +5759,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
5759 | 5759 | ||
5760 | face=Convert.ToInt32(rules.Data[idx++].ToString()); | 5760 | face=Convert.ToInt32(rules.Data[idx++].ToString()); |
5761 | LSL_Types.Vector3 color=new LSL_Types.Vector3(rules.Data[idx++].ToString()); | 5761 | LSL_Types.Vector3 color=new LSL_Types.Vector3(rules.Data[idx++].ToString()); |
5762 | double alpha=Convert.ToDouble(rules.Data[idx++]); | 5762 | double alpha=Convert.ToDouble(rules.Data[idx++].ToString()); |
5763 | 5763 | ||
5764 | SetColor(part, color, face); | 5764 | SetColor(part, color, face); |
5765 | SetAlpha(part, alpha, face); | 5765 | SetAlpha(part, alpha, face); |
@@ -5785,9 +5785,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
5785 | return; | 5785 | return; |
5786 | LSL_Types.LSLInteger light = new LSL_Types.LSLInteger(rules.Data[idx++].ToString()); | 5786 | LSL_Types.LSLInteger light = new LSL_Types.LSLInteger(rules.Data[idx++].ToString()); |
5787 | LSL_Types.Vector3 lightcolor = new LSL_Types.Vector3(rules.Data[idx++].ToString()); | 5787 | LSL_Types.Vector3 lightcolor = new LSL_Types.Vector3(rules.Data[idx++].ToString()); |
5788 | float intensity = (float)Convert.ToDouble(rules.Data[idx++]); | 5788 | float intensity = (float)Convert.ToDouble(rules.Data[idx++].ToString()); |
5789 | float radius = (float)Convert.ToDouble(rules.Data[idx++]); | 5789 | float radius = (float)Convert.ToDouble(rules.Data[idx++].ToString()); |
5790 | float falloff = (float)Convert.ToDouble(rules.Data[idx++]); | 5790 | float falloff = (float)Convert.ToDouble(rules.Data[idx++].ToString()); |
5791 | 5791 | ||
5792 | SetPointLight(part, light, lightcolor, intensity, radius, falloff); | 5792 | SetPointLight(part, light, lightcolor, intensity, radius, falloff); |
5793 | 5793 | ||
@@ -5796,7 +5796,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
5796 | if (remain < 2) | 5796 | if (remain < 2) |
5797 | return; | 5797 | return; |
5798 | face = Convert.ToInt32(rules.Data[idx++].ToString()); | 5798 | face = Convert.ToInt32(rules.Data[idx++].ToString()); |
5799 | float glow = (float)Convert.ToDouble(rules.Data[idx++]); | 5799 | float glow = (float)Convert.ToDouble(rules.Data[idx++].ToString()); |
5800 | 5800 | ||
5801 | SetGlow(part, face, glow); | 5801 | SetGlow(part, face, glow); |
5802 | 5802 | ||
@@ -5806,7 +5806,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
5806 | return; | 5806 | return; |
5807 | face = Convert.ToInt32(rules.Data[idx++].ToString()); | 5807 | face = Convert.ToInt32(rules.Data[idx++].ToString()); |
5808 | int shiny = Convert.ToInt32(rules.Data[idx++].ToString()); | 5808 | int shiny = Convert.ToInt32(rules.Data[idx++].ToString()); |
5809 | Bumpiness bump = (Bumpiness)Convert.ToByte(rules.Data[idx++]); | 5809 | Bumpiness bump = (Bumpiness)Convert.ToByte(rules.Data[idx++].ToString()); |
5810 | 5810 | ||
5811 | SetShiny(part, face, shiny, bump); | 5811 | SetShiny(part, face, shiny, bump); |
5812 | 5812 | ||
@@ -5831,7 +5831,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
5831 | { | 5831 | { |
5832 | /* Unhandled at this time - sends "Unhandled" message | 5832 | /* Unhandled at this time - sends "Unhandled" message |
5833 | will enable when available | 5833 | will enable when available |
5834 | byte material = (byte)Convert.ToByte( rules.Data[idx++]); | 5834 | byte material = (byte)Convert.ToByte( rules.Data[idx++].ToString()); |
5835 | part.Material = material; | 5835 | part.Material = material; |
5836 | */ | 5836 | */ |
5837 | return; | 5837 | return; |