aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorSignpostMarv2012-08-24 17:02:13 +0100
committerJustin Clark-Casey (justincc)2012-08-25 02:30:23 +0100
commit2a2e120470ea530ea0a6f035c5cf28247f94532c (patch)
treeb19036258ed0a6962f0db90081024c6eaec75ca0 /OpenSim
parentuse SceneObjectPart instead of var (diff)
downloadopensim-SC_OLD-2a2e120470ea530ea0a6f035c5cf28247f94532c.zip
opensim-SC_OLD-2a2e120470ea530ea0a6f035c5cf28247f94532c.tar.gz
opensim-SC_OLD-2a2e120470ea530ea0a6f035c5cf28247f94532c.tar.bz2
opensim-SC_OLD-2a2e120470ea530ea0a6f035c5cf28247f94532c.tar.xz
since we will be making the Get return type the remaining ruleset as with the Set return type, we need to move the original return type to a ref param
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs38
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs2
2 files changed, 22 insertions, 18 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index 03b5982..6e46992 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -7910,7 +7910,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7910 public LSL_List llGetPrimitiveParams(LSL_List rules) 7910 public LSL_List llGetPrimitiveParams(LSL_List rules)
7911 { 7911 {
7912 m_host.AddScriptLPS(1); 7912 m_host.AddScriptLPS(1);
7913 return GetPrimParams(m_host, rules); 7913
7914 LSL_List result = new LSL_List();
7915
7916 GetPrimParams(m_host, rules, ref result);
7917
7918 return result;
7914 } 7919 }
7915 7920
7916 public LSL_List llGetLinkPrimitiveParams(int linknumber, LSL_List rules) 7921 public LSL_List llGetLinkPrimitiveParams(int linknumber, LSL_List rules)
@@ -7923,16 +7928,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7923 7928
7924 foreach (SceneObjectPart part in parts) 7929 foreach (SceneObjectPart part in parts)
7925 { 7930 {
7926 LSL_List partRes = GetPrimParams(part, rules); 7931 GetPrimParams(part, rules, ref res);
7927 res += partRes;
7928 } 7932 }
7929 7933
7930 return res; 7934 return res;
7931 } 7935 }
7932 7936
7933 public LSL_List GetPrimParams(SceneObjectPart part, LSL_List rules) 7937 public void GetPrimParams(SceneObjectPart part, LSL_List rules, ref LSL_List res)
7934 { 7938 {
7935 LSL_List res = new LSL_List();
7936 int idx=0; 7939 int idx=0;
7937 while (idx < rules.Length) 7940 while (idx < rules.Length)
7938 { 7941 {
@@ -8077,7 +8080,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8077 8080
8078 case (int)ScriptBaseClass.PRIM_TEXTURE: 8081 case (int)ScriptBaseClass.PRIM_TEXTURE:
8079 if (remain < 1) 8082 if (remain < 1)
8080 return res; 8083 return;
8081 8084
8082 int face = (int)rules.GetLSLIntegerItem(idx++); 8085 int face = (int)rules.GetLSLIntegerItem(idx++);
8083 Primitive.TextureEntry tex = part.Shape.Textures; 8086 Primitive.TextureEntry tex = part.Shape.Textures;
@@ -8117,7 +8120,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8117 8120
8118 case (int)ScriptBaseClass.PRIM_COLOR: 8121 case (int)ScriptBaseClass.PRIM_COLOR:
8119 if (remain < 1) 8122 if (remain < 1)
8120 return res; 8123 return;
8121 8124
8122 face=(int)rules.GetLSLIntegerItem(idx++); 8125 face=(int)rules.GetLSLIntegerItem(idx++);
8123 8126
@@ -8146,7 +8149,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8146 8149
8147 case (int)ScriptBaseClass.PRIM_BUMP_SHINY: 8150 case (int)ScriptBaseClass.PRIM_BUMP_SHINY:
8148 if (remain < 1) 8151 if (remain < 1)
8149 return res; 8152 return;
8150 8153
8151 face=(int)rules.GetLSLIntegerItem(idx++); 8154 face=(int)rules.GetLSLIntegerItem(idx++);
8152 8155
@@ -8177,7 +8180,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8177 8180
8178 case (int)ScriptBaseClass.PRIM_FULLBRIGHT: 8181 case (int)ScriptBaseClass.PRIM_FULLBRIGHT:
8179 if (remain < 1) 8182 if (remain < 1)
8180 return res; 8183 return;
8181 8184
8182 face=(int)rules.GetLSLIntegerItem(idx++); 8185 face=(int)rules.GetLSLIntegerItem(idx++);
8183 8186
@@ -8219,7 +8222,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8219 8222
8220 case (int)ScriptBaseClass.PRIM_TEXGEN: 8223 case (int)ScriptBaseClass.PRIM_TEXGEN:
8221 if (remain < 1) 8224 if (remain < 1)
8222 return res; 8225 return;
8223 8226
8224 face=(int)rules.GetLSLIntegerItem(idx++); 8227 face=(int)rules.GetLSLIntegerItem(idx++);
8225 8228
@@ -8260,7 +8263,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8260 8263
8261 case (int)ScriptBaseClass.PRIM_GLOW: 8264 case (int)ScriptBaseClass.PRIM_GLOW:
8262 if (remain < 1) 8265 if (remain < 1)
8263 return res; 8266 return;
8264 8267
8265 face=(int)rules.GetLSLIntegerItem(idx++); 8268 face=(int)rules.GetLSLIntegerItem(idx++);
8266 8269
@@ -8314,7 +8317,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8314 break; 8317 break;
8315 } 8318 }
8316 } 8319 }
8317 return res;
8318 } 8320 }
8319 8321
8320 public LSL_List llGetPrimMediaParams(int face, LSL_List rules) 8322 public LSL_List llGetPrimMediaParams(int face, LSL_List rules)
@@ -10755,13 +10757,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
10755 public LSL_List GetPrimitiveParamsEx(LSL_Key prim, LSL_List rules) 10757 public LSL_List GetPrimitiveParamsEx(LSL_Key prim, LSL_List rules)
10756 { 10758 {
10757 SceneObjectPart obj = World.GetSceneObjectPart(new UUID(prim)); 10759 SceneObjectPart obj = World.GetSceneObjectPart(new UUID(prim));
10758 if (obj == null)
10759 return new LSL_List();
10760 10760
10761 if (obj.OwnerID != m_host.OwnerID) 10761 LSL_List result = new LSL_List();
10762 return new LSL_List();
10763 10762
10764 return GetPrimParams(obj, rules); 10763 if (obj != null && obj.OwnerID != m_host.OwnerID)
10764 {
10765 GetPrimParams(obj, rules, ref result);
10766 }
10767
10768 return result;
10765 } 10769 }
10766 10770
10767 public void print(string str) 10771 public void print(string str)
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
index c277708..a391b73 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
@@ -2250,7 +2250,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2250 List<SceneObjectPart> parts = ((LSL_Api)m_LSL_Api).GetLinkParts(linknumber); 2250 List<SceneObjectPart> parts = ((LSL_Api)m_LSL_Api).GetLinkParts(linknumber);
2251 foreach (SceneObjectPart part in parts) 2251 foreach (SceneObjectPart part in parts)
2252 { 2252 {
2253 retVal += ((LSL_Api)m_LSL_Api).GetPrimParams(part, rules); 2253 ((LSL_Api)m_LSL_Api).GetPrimParams(part, rules, ref retVal);
2254 } 2254 }
2255 return retVal; 2255 return retVal;
2256 } 2256 }