ll rez objects: silent ginore null object id; remove redundante llSetColor code
parent
8a8ce8b10a
commit
9da1ca2b44
|
@ -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);
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue