aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs66
1 files changed, 63 insertions, 3 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index 5ab6c4d..9a3fc5c 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -1038,7 +1038,57 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1038 return; 1038 return;
1039 } 1039 }
1040 } 1040 }
1041 1041
1042 public void SetShiny(SceneObjectPart part, int face, int shiny, Bumpiness bump)
1043 {
1044
1045 Shininess sval = new Shininess();
1046
1047 switch (shiny)
1048 {
1049 case 0:
1050 sval = Shininess.None;
1051 break;
1052 case 1:
1053 sval = Shininess.Low;
1054 break;
1055 case 2:
1056 sval = Shininess.Medium;
1057 break;
1058 case 3:
1059 sval = Shininess.High;
1060 break;
1061 default:
1062 sval = Shininess.None;
1063 break;
1064 }
1065
1066 LLObject.TextureEntry tex = part.Shape.Textures;
1067 if (face > -1)
1068 {
1069 tex.CreateFace((uint) face);
1070 tex.FaceTextures[face].Shiny = sval;
1071 tex.FaceTextures[face].Bump = bump;
1072 part.UpdateTexture(tex);
1073 return;
1074 }
1075 else if (face == -1)
1076 {
1077 for (uint i = 0; i < 32; i++)
1078 {
1079 if (tex.FaceTextures[i] != null)
1080 {
1081 tex.FaceTextures[i].Shiny = sval;
1082 tex.FaceTextures[i].Bump = bump;;
1083 }
1084 tex.DefaultTexture.Shiny = sval;
1085 tex.DefaultTexture.Bump = bump;
1086 }
1087 part.UpdateTexture(tex);
1088 return;
1089 }
1090 }
1091
1042 public double llGetAlpha(int face) 1092 public double llGetAlpha(int face)
1043 { 1093 {
1044 m_host.AddScriptLPS(1); 1094 m_host.AddScriptLPS(1);
@@ -5437,8 +5487,18 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5437 5487
5438 SetGlow(part, face, glow); 5488 SetGlow(part, face, glow);
5439 5489
5440 break; 5490 break;
5441 } 5491 case (int)ScriptBaseClass.PRIM_BUMP_SHINY:
5492 if (remain < 3)
5493 return;
5494 face = Convert.ToInt32(rules.Data[idx++]);
5495 int shiny = Convert.ToInt32(rules.Data[idx++]);
5496 Bumpiness bump = (Bumpiness)Convert.ToByte(rules.Data[idx++]);
5497
5498 SetShiny(part, face, shiny, bump);
5499
5500 break;
5501 }
5442 } 5502 }
5443 } 5503 }
5444 5504