diff options
author | UbitUmarov | 2019-03-02 15:38:36 +0000 |
---|---|---|
committer | UbitUmarov | 2019-03-02 15:38:36 +0000 |
commit | 9da1ca2b44556d8c27fb3db104aa2ace2501e4ea (patch) | |
tree | 3fa79168420488d13d159fa6cc35eb65edc4de0b /OpenSim | |
parent | put back assetViewer cap code, to allow viewers testing. It is disabled at Op... (diff) | |
download | opensim-SC-9da1ca2b44556d8c27fb3db104aa2ace2501e4ea.zip opensim-SC-9da1ca2b44556d8c27fb3db104aa2ace2501e4ea.tar.gz opensim-SC-9da1ca2b44556d8c27fb3db104aa2ace2501e4ea.tar.bz2 opensim-SC-9da1ca2b44556d8c27fb3db104aa2ace2501e4ea.tar.xz |
ll rez objects: silent ginore null object id; remove redundante llSetColor code
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 41 |
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); |