From 9da1ca2b44556d8c27fb3db104aa2ace2501e4ea Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sat, 2 Mar 2019 15:38:36 +0000 Subject: [PATCH] ll rez objects: silent ginore null object id; remove redundante llSetColor code --- .../Shared/Api/Implementation/LSL_Api.cs | 41 +------------------ bin/config-include/osslEnable.ini | 4 +- 2 files changed, 3 insertions(+), 42 deletions(-) diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index bb4bab0b58..95d7a7a780 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 if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted) return; - Primitive.TextureEntry tex = part.Shape.Textures; - int nsides = GetNumberOfSides(part); - Color4 texcolor; - - if (face >= 0 && face < nsides) - { - texcolor = tex.CreateFace((uint)face).RGBA; - texcolor.R = Util.Clip((float)color.x, 0.0f, 1.0f); - texcolor.G = Util.Clip((float)color.y, 0.0f, 1.0f); - texcolor.B = Util.Clip((float)color.z, 0.0f, 1.0f); - tex.FaceTextures[face].RGBA = texcolor; - part.UpdateTextureEntry(tex); - return; - } - else if (face == ScriptBaseClass.ALL_SIDES) - { - for (uint i = 0; i < nsides; i++) - { - if (tex.FaceTextures[i] != null) - { - texcolor = tex.FaceTextures[i].RGBA; - texcolor.R = Util.Clip((float)color.x, 0.0f, 1.0f); - texcolor.G = Util.Clip((float)color.y, 0.0f, 1.0f); - texcolor.B = Util.Clip((float)color.z, 0.0f, 1.0f); - tex.FaceTextures[i].RGBA = texcolor; - } - texcolor = tex.DefaultTexture.RGBA; - texcolor.R = Util.Clip((float)color.x, 0.0f, 1.0f); - texcolor.G = Util.Clip((float)color.y, 0.0f, 1.0f); - texcolor.B = Util.Clip((float)color.z, 0.0f, 1.0f); - tex.DefaultTexture.RGBA = texcolor; - } - part.UpdateTextureEntry(tex); - return; - } - - if (face == ScriptBaseClass.ALL_SIDES) - face = SceneObjectPart.ALL_SIDES; - m_host.SetFaceColorAlpha(face, color, null); } @@ -3577,7 +3538,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void doObjectRez(string inventory, LSL_Vector pos, LSL_Vector vel, LSL_Rotation rot, int param, bool atRoot) { m_host.AddScriptLPS(1); - if (Double.IsNaN(rot.x) || Double.IsNaN(rot.y) || Double.IsNaN(rot.z) || Double.IsNaN(rot.s)) + if (string.IsNullOrEmpty(inventory) || Double.IsNaN(rot.x) || Double.IsNaN(rot.y) || Double.IsNaN(rot.z) || Double.IsNaN(rot.s)) return; float dist = (float)llVecDist(llGetPos(), pos); diff --git a/bin/config-include/osslEnable.ini b/bin/config-include/osslEnable.ini index a96459ae82..f127b1fe3c 100644 --- a/bin/config-include/osslEnable.ini +++ b/bin/config-include/osslEnable.ini @@ -155,7 +155,6 @@ Allow_osForceDropAttachmentAt = ${OSSL|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER Allow_osGetLinkPrimitiveParams = ${OSSL|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER Allow_osGetPhysicsEngineType = true - Allow_osGetPrimitiveParams = ${OSSL|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER Allow_osGetRegionMapTexture = ${OSSL|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER Allow_osGetScriptEngineName = true Allow_osGetSimulatorVersion = true @@ -185,7 +184,6 @@ Allow_osParcelSubdivide = ESTATE_MANAGER,ESTATE_OWNER Allow_osRegionRestart = ESTATE_MANAGER,ESTATE_OWNER Allow_osRegionNotice = ESTATE_MANAGER,ESTATE_OWNER - Allow_osSetPrimitiveParams = false Allow_osSetProjectionParams = ${OSSL|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER Allow_osSetRegionWaterHeight = ESTATE_MANAGER,ESTATE_OWNER Allow_osSetStateEvents = false ; deprecated @@ -250,6 +248,7 @@ ; Allow_osGetLinkNumber = true ; Allow_osGetMapTexture = true ; Allow_osGetPhysicsEngineName = true +; Allow_osGetPrimitiveParams = true ; Allow_osGetRegionSize = true ; Allow_osGetSunParam = true ; Allow_osGetTerrainHeight = true @@ -275,6 +274,7 @@ ; Allow_osSetPenCap = true ; Allow_osSetPenColor = true ; Allow_osSetPenSize = true +; Allow_osSetPrimitiveParams = true ; Allow_osSetSoundRadius = true ; Allow_osStopSound = true ; Allow_osStringSubString = true