aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared/Api/Implementation
diff options
context:
space:
mode:
authorSignpostMarv2012-08-24 17:44:39 +0100
committerJustin Clark-Casey (justincc)2012-08-25 02:30:23 +0100
commit6e86b230120776a7da4727dd1aedeca6b91e3169 (patch)
tree4e4e010e65a499f959fb9e130d856c86f2397fa0 /OpenSim/Region/ScriptEngine/Shared/Api/Implementation
parentminor formatting (diff)
downloadopensim-SC-6e86b230120776a7da4727dd1aedeca6b91e3169.zip
opensim-SC-6e86b230120776a7da4727dd1aedeca6b91e3169.tar.gz
opensim-SC-6e86b230120776a7da4727dd1aedeca6b91e3169.tar.bz2
opensim-SC-6e86b230120776a7da4727dd1aedeca6b91e3169.tar.xz
implementing PRIM_LINK_TARGET on GetPrimParams ala SetPrimParams
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs58
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs13
2 files changed, 60 insertions, 11 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index 0f0eac6..b001c51 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -7913,7 +7913,17 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7913 7913
7914 LSL_List result = new LSL_List(); 7914 LSL_List result = new LSL_List();
7915 7915
7916 GetPrimParams(m_host, rules, ref result); 7916 LSL_List remaining = GetPrimParams(m_host, rules, ref result);
7917
7918 while (remaining != null && remaining.Length > 2)
7919 {
7920 int linknumber = remaining.GetLSLIntegerItem(0);
7921 rules = remaining.GetSublist(1, -1);
7922 List<SceneObjectPart> parts = GetLinkParts(linknumber);
7923
7924 foreach (SceneObjectPart part in parts)
7925 remaining = GetPrimParams(part, rules, ref result);
7926 }
7917 7927
7918 return result; 7928 return result;
7919 } 7929 }
@@ -7925,16 +7935,27 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7925 List<SceneObjectPart> parts = GetLinkParts(linknumber); 7935 List<SceneObjectPart> parts = GetLinkParts(linknumber);
7926 7936
7927 LSL_List res = new LSL_List(); 7937 LSL_List res = new LSL_List();
7938 LSL_List remaining = null;
7928 7939
7929 foreach (SceneObjectPart part in parts) 7940 foreach (SceneObjectPart part in parts)
7930 { 7941 {
7931 GetPrimParams(part, rules, ref res); 7942 remaining = GetPrimParams(part, rules, ref res);
7943 }
7944
7945 while (remaining != null && remaining.Length > 2)
7946 {
7947 linknumber = remaining.GetLSLIntegerItem(0);
7948 rules = remaining.GetSublist(1, -1);
7949 parts = GetLinkParts(linknumber);
7950
7951 foreach (SceneObjectPart part in parts)
7952 remaining = GetPrimParams(part, rules, ref res);
7932 } 7953 }
7933 7954
7934 return res; 7955 return res;
7935 } 7956 }
7936 7957
7937 public void GetPrimParams(SceneObjectPart part, LSL_List rules, ref LSL_List res) 7958 public LSL_List GetPrimParams(SceneObjectPart part, LSL_List rules, ref LSL_List res)
7938 { 7959 {
7939 int idx=0; 7960 int idx=0;
7940 while (idx < rules.Length) 7961 while (idx < rules.Length)
@@ -8080,7 +8101,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8080 8101
8081 case (int)ScriptBaseClass.PRIM_TEXTURE: 8102 case (int)ScriptBaseClass.PRIM_TEXTURE:
8082 if (remain < 1) 8103 if (remain < 1)
8083 return; 8104 return null;
8084 8105
8085 int face = (int)rules.GetLSLIntegerItem(idx++); 8106 int face = (int)rules.GetLSLIntegerItem(idx++);
8086 Primitive.TextureEntry tex = part.Shape.Textures; 8107 Primitive.TextureEntry tex = part.Shape.Textures;
@@ -8120,7 +8141,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8120 8141
8121 case (int)ScriptBaseClass.PRIM_COLOR: 8142 case (int)ScriptBaseClass.PRIM_COLOR:
8122 if (remain < 1) 8143 if (remain < 1)
8123 return; 8144 return null;
8124 8145
8125 face=(int)rules.GetLSLIntegerItem(idx++); 8146 face=(int)rules.GetLSLIntegerItem(idx++);
8126 8147
@@ -8149,7 +8170,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8149 8170
8150 case (int)ScriptBaseClass.PRIM_BUMP_SHINY: 8171 case (int)ScriptBaseClass.PRIM_BUMP_SHINY:
8151 if (remain < 1) 8172 if (remain < 1)
8152 return; 8173 return null;
8153 8174
8154 face=(int)rules.GetLSLIntegerItem(idx++); 8175 face=(int)rules.GetLSLIntegerItem(idx++);
8155 8176
@@ -8180,7 +8201,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8180 8201
8181 case (int)ScriptBaseClass.PRIM_FULLBRIGHT: 8202 case (int)ScriptBaseClass.PRIM_FULLBRIGHT:
8182 if (remain < 1) 8203 if (remain < 1)
8183 return; 8204 return null;
8184 8205
8185 face=(int)rules.GetLSLIntegerItem(idx++); 8206 face=(int)rules.GetLSLIntegerItem(idx++);
8186 8207
@@ -8222,7 +8243,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8222 8243
8223 case (int)ScriptBaseClass.PRIM_TEXGEN: 8244 case (int)ScriptBaseClass.PRIM_TEXGEN:
8224 if (remain < 1) 8245 if (remain < 1)
8225 return; 8246 return null;
8226 8247
8227 face=(int)rules.GetLSLIntegerItem(idx++); 8248 face=(int)rules.GetLSLIntegerItem(idx++);
8228 8249
@@ -8263,7 +8284,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8263 8284
8264 case (int)ScriptBaseClass.PRIM_GLOW: 8285 case (int)ScriptBaseClass.PRIM_GLOW:
8265 if (remain < 1) 8286 if (remain < 1)
8266 return; 8287 return null;
8267 8288
8268 face=(int)rules.GetLSLIntegerItem(idx++); 8289 face=(int)rules.GetLSLIntegerItem(idx++);
8269 8290
@@ -8315,8 +8336,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8315 0 8336 0
8316 )); 8337 ));
8317 break; 8338 break;
8339 case (int)ScriptBaseClass.PRIM_LINK_TARGET:
8340 if(remain < 3)
8341 return null;
8342
8343 return rules.GetSublist(idx, -1);
8318 } 8344 }
8319 } 8345 }
8346
8347 return null;
8320 } 8348 }
8321 8349
8322 public LSL_List llGetPrimMediaParams(int face, LSL_List rules) 8350 public LSL_List llGetPrimMediaParams(int face, LSL_List rules)
@@ -10762,7 +10790,17 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
10762 10790
10763 if (obj != null && obj.OwnerID != m_host.OwnerID) 10791 if (obj != null && obj.OwnerID != m_host.OwnerID)
10764 { 10792 {
10765 GetPrimParams(obj, rules, ref result); 10793 LSL_List remaining = GetPrimParams(obj, rules, ref result);
10794
10795 while (remaining != null && remaining.Length > 2)
10796 {
10797 int linknumber = remaining.GetLSLIntegerItem(0);
10798 rules = remaining.GetSublist(1, -1);
10799 List<SceneObjectPart> parts = GetLinkParts(linknumber);
10800
10801 foreach (SceneObjectPart part in parts)
10802 remaining = GetPrimParams(part, rules, ref result);
10803 }
10766 } 10804 }
10767 10805
10768 return result; 10806 return result;
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
index 927f37c..1afa4fb 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
@@ -2250,10 +2250,21 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2250 // on the ILSL_Api interface. 2250 // on the ILSL_Api interface.
2251 LSL_Api LSL_Api = (LSL_Api)m_LSL_Api; 2251 LSL_Api LSL_Api = (LSL_Api)m_LSL_Api;
2252 LSL_List retVal = new LSL_List(); 2252 LSL_List retVal = new LSL_List();
2253 LSL_List remaining = null;
2253 List<SceneObjectPart> parts = LSL_Api.GetLinkParts(linknumber); 2254 List<SceneObjectPart> parts = LSL_Api.GetLinkParts(linknumber);
2254 foreach (SceneObjectPart part in parts) 2255 foreach (SceneObjectPart part in parts)
2255 { 2256 {
2256 LSL_Api.GetPrimParams(part, rules, ref retVal); 2257 remaining = LSL_Api.GetPrimParams(part, rules, ref retVal);
2258 }
2259
2260 while (remaining != null && remaining.Length > 2)
2261 {
2262 linknumber = remaining.GetLSLIntegerItem(0);
2263 rules = remaining.GetSublist(1, -1);
2264 parts = LSL_Api.GetLinkParts(linknumber);
2265
2266 foreach (SceneObjectPart part in parts)
2267 remaining = LSL_Api.GetPrimParams(part, rules, ref retVal);
2257 } 2268 }
2258 return retVal; 2269 return retVal;
2259 } 2270 }