aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared/Api
diff options
context:
space:
mode:
authorCharles Krinke2008-09-05 23:26:35 +0000
committerCharles Krinke2008-09-05 23:26:35 +0000
commit947242f4764b8d98fe860d3c18bcea709aea777f (patch)
tree2169a26250473aa887dac6f492b582e779d41639 /OpenSim/Region/ScriptEngine/Shared/Api
parentThank you kindly, KrTaylor for a patch that adds: (diff)
downloadopensim-SC_OLD-947242f4764b8d98fe860d3c18bcea709aea777f.zip
opensim-SC_OLD-947242f4764b8d98fe860d3c18bcea709aea777f.tar.gz
opensim-SC_OLD-947242f4764b8d98fe860d3c18bcea709aea777f.tar.bz2
opensim-SC_OLD-947242f4764b8d98fe860d3c18bcea709aea777f.tar.xz
Mantis#2126. Thank you kindly, Ralphos for a patch that addresses:
Types extracted from a LSL_Types.list have to be down-cast initially to the exact type of value type object that the Object actually is. This would make for very cumbersome, ugly code when extracting list parameter items in ll functions where a few implicit conversions should be applied such as key -> LSLString and LSLInteger -> LSLFloat (but not LSLFloat -> LSLInteger). This patch adds a set of GetXXXItem member functions to the LLS_Type.list class, where XXX is the name of the LSL_Type to be extracted: LSLFLoat, LSLInteger etc. All take a single, int parameter that is the item number to be extracted.
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs14
1 files changed, 7 insertions, 7 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index 74c2d89..93dfeea 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -5726,13 +5726,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5726 if (remain < 7) 5726 if (remain < 7)
5727 return; 5727 return;
5728 5728
5729 bool flexi = (LSL_Types.LSLInteger)rules.Data[idx++]; 5729 bool flexi = rules.GetLSLIntegerItem(idx++);
5730 int softness = (LSL_Types.LSLInteger)rules.Data[idx++]; 5730 int softness = rules.GetLSLIntegerItem(idx++);
5731 float gravity = (float)(LSL_Types.LSLFloat)rules.Data[idx++]; 5731 float gravity = (float)rules.GetLSLFloatItem(idx++);
5732 float friction = (float)(LSL_Types.LSLFloat)rules.Data[idx++]; 5732 float friction = (float)rules.GetLSLFloatItem(idx++);
5733 float wind = (float)(LSL_Types.LSLFloat)rules.Data[idx++]; 5733 float wind = (float)rules.GetLSLFloatItem(idx++);
5734 float tension = (float)(LSL_Types.LSLFloat)rules.Data[idx++]; 5734 float tension = (float)rules.GetLSLFloatItem(idx++);
5735 LSL_Types.Vector3 force = (LSL_Types.Vector3)rules.Data[idx++]; 5735 LSL_Types.Vector3 force = rules.GetVector3Item(idx++);
5736 5736
5737 SetFlexi(part, flexi, softness, gravity, friction, wind, tension, force); 5737 SetFlexi(part, flexi, softness, gravity, friction, wind, tension, force);
5738 5738