aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared/Api/Implementation
diff options
context:
space:
mode:
authorCharles Krinke2009-04-26 00:45:48 +0000
committerCharles Krinke2009-04-26 00:45:48 +0000
commitc3d619498f7d92ea69a269bd22720056965fb048 (patch)
tree7bf644e599fe66e10990009300d76b8bbd2f04b3 /OpenSim/Region/ScriptEngine/Shared/Api/Implementation
parentThanks, Ewe Loon for a patch that (diff)
downloadopensim-SC-c3d619498f7d92ea69a269bd22720056965fb048.zip
opensim-SC-c3d619498f7d92ea69a269bd22720056965fb048.tar.gz
opensim-SC-c3d619498f7d92ea69a269bd22720056965fb048.tar.bz2
opensim-SC-c3d619498f7d92ea69a269bd22720056965fb048.tar.xz
Thank you kindly, Ewe Loon, for a patch that solves:
PRIM_TEXGEN not in llSetPrimitiveParams. Patch has been included to implement it.
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs39
1 files changed, 39 insertions, 0 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index faacc76..cf3270e 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -1305,6 +1305,36 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1305 } 1305 }
1306 } 1306 }
1307 1307
1308 public void SetTexGen(SceneObjectPart part, int face,int style)
1309 {
1310 Primitive.TextureEntry tex = part.Shape.Textures;
1311 MappingType textype;
1312 textype = MappingType.Default;
1313 if (style == (int)ScriptBaseClass.PRIM_TEXGEN_PLANAR)
1314 textype = MappingType.Planar;
1315
1316 if (face >= 0 && face < GetNumberOfSides(part))
1317 {
1318 tex.CreateFace((uint) face);
1319 tex.FaceTextures[face].TexMapType = textype;
1320 part.UpdateTexture(tex);
1321 return;
1322 }
1323 else if (face == ScriptBaseClass.ALL_SIDES)
1324 {
1325 for (uint i = 0; i < GetNumberOfSides(part); i++)
1326 {
1327 if (tex.FaceTextures[i] != null)
1328 {
1329 tex.FaceTextures[i].TexMapType = textype;
1330 }
1331 tex.DefaultTexture.TexMapType = textype;
1332 }
1333 part.UpdateTexture(tex);
1334 return;
1335 }
1336 }
1337
1308 public void SetGlow(SceneObjectPart part, int face, float glow) 1338 public void SetGlow(SceneObjectPart part, int face, float glow)
1309 { 1339 {
1310 Primitive.TextureEntry tex = part.Shape.Textures; 1340 Primitive.TextureEntry tex = part.Shape.Textures;
@@ -6822,6 +6852,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6822 6852
6823 part.ScriptSetTemporaryStatus(tempOnRez); 6853 part.ScriptSetTemporaryStatus(tempOnRez);
6824 break; 6854 break;
6855
6856 case (int)ScriptBaseClass.PRIM_TEXGEN:
6857 if (remain < 2)
6858 return;
6859 //face,type
6860 face = rules.GetLSLIntegerItem(idx++);
6861 int style = rules.GetLSLIntegerItem(idx++);
6862 SetTexGen(part, face, style);
6863 break;
6825 } 6864 }
6826 } 6865 }
6827 } 6866 }