aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs41
1 files changed, 1 insertions, 40 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index bb4bab0..95d7a7a 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -1936,45 +1936,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1936 if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted) 1936 if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted)
1937 return; 1937 return;
1938 1938
1939 Primitive.TextureEntry tex = part.Shape.Textures;
1940 int nsides = GetNumberOfSides(part);
1941 Color4 texcolor;
1942
1943 if (face >= 0 && face < nsides)
1944 {
1945 texcolor = tex.CreateFace((uint)face).RGBA;
1946 texcolor.R = Util.Clip((float)color.x, 0.0f, 1.0f);
1947 texcolor.G = Util.Clip((float)color.y, 0.0f, 1.0f);
1948 texcolor.B = Util.Clip((float)color.z, 0.0f, 1.0f);
1949 tex.FaceTextures[face].RGBA = texcolor;
1950 part.UpdateTextureEntry(tex);
1951 return;
1952 }
1953 else if (face == ScriptBaseClass.ALL_SIDES)
1954 {
1955 for (uint i = 0; i < nsides; i++)
1956 {
1957 if (tex.FaceTextures[i] != null)
1958 {
1959 texcolor = tex.FaceTextures[i].RGBA;
1960 texcolor.R = Util.Clip((float)color.x, 0.0f, 1.0f);
1961 texcolor.G = Util.Clip((float)color.y, 0.0f, 1.0f);
1962 texcolor.B = Util.Clip((float)color.z, 0.0f, 1.0f);
1963 tex.FaceTextures[i].RGBA = texcolor;
1964 }
1965 texcolor = tex.DefaultTexture.RGBA;
1966 texcolor.R = Util.Clip((float)color.x, 0.0f, 1.0f);
1967 texcolor.G = Util.Clip((float)color.y, 0.0f, 1.0f);
1968 texcolor.B = Util.Clip((float)color.z, 0.0f, 1.0f);
1969 tex.DefaultTexture.RGBA = texcolor;
1970 }
1971 part.UpdateTextureEntry(tex);
1972 return;
1973 }
1974
1975 if (face == ScriptBaseClass.ALL_SIDES)
1976 face = SceneObjectPart.ALL_SIDES;
1977
1978 m_host.SetFaceColorAlpha(face, color, null); 1939 m_host.SetFaceColorAlpha(face, color, null);
1979 } 1940 }
1980 1941
@@ -3577,7 +3538,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3577 public void doObjectRez(string inventory, LSL_Vector pos, LSL_Vector vel, LSL_Rotation rot, int param, bool atRoot) 3538 public void doObjectRez(string inventory, LSL_Vector pos, LSL_Vector vel, LSL_Rotation rot, int param, bool atRoot)
3578 { 3539 {
3579 m_host.AddScriptLPS(1); 3540 m_host.AddScriptLPS(1);
3580 if (Double.IsNaN(rot.x) || Double.IsNaN(rot.y) || Double.IsNaN(rot.z) || Double.IsNaN(rot.s)) 3541 if (string.IsNullOrEmpty(inventory) || Double.IsNaN(rot.x) || Double.IsNaN(rot.y) || Double.IsNaN(rot.z) || Double.IsNaN(rot.s))
3581 return; 3542 return;
3582 3543
3583 float dist = (float)llVecDist(llGetPos(), pos); 3544 float dist = (float)llVecDist(llGetPos(), pos);