Merge branch 'careminster' into careminster-presence-refactor

avinationmerge
Melanie 2010-03-18 20:00:58 +00:00
commit 46d990419b
2 changed files with 199 additions and 193 deletions

View File

@ -221,8 +221,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
public List<SceneObjectPart> GetLinkParts(int linkType) public List<SceneObjectPart> GetLinkParts(int linkType)
{ {
List<SceneObjectPart> ret = new List<SceneObjectPart>(); List<SceneObjectPart> ret = new List<SceneObjectPart>();
if (m_host == null || m_host.ParentGroup == null || m_host.ParentGroup.IsDeleted) if (m_host == null || m_host.ParentGroup == null || m_host.ParentGroup.IsDeleted)
return ret; return ret;
ret.Add(m_host); ret.Add(m_host);
@ -1115,6 +1115,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
return detectedParams.TouchUV; return detectedParams.TouchUV;
} }
[DebuggerNonUserCode]
public virtual void llDie() public virtual void llDie()
{ {
m_host.AddScriptLPS(1); m_host.AddScriptLPS(1);
@ -1190,8 +1191,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
} }
public void llSetStatus(int status, int value) public void llSetStatus(int status, int value)
{ {
if (m_host == null || m_host.ParentGroup == null || m_host.ParentGroup.IsDeleted) if (m_host == null || m_host.ParentGroup == null || m_host.ParentGroup.IsDeleted)
return; return;
m_host.AddScriptLPS(1); m_host.AddScriptLPS(1);
@ -1367,7 +1368,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
} }
protected void SetScale(SceneObjectPart part, LSL_Vector scale) protected void SetScale(SceneObjectPart part, LSL_Vector scale)
{ {
// TODO: this needs to trigger a persistance save as well // TODO: this needs to trigger a persistance save as well
if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted) if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted)
return; return;
@ -1426,8 +1427,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
} }
protected void SetColor(SceneObjectPart part, LSL_Vector color, int face) protected void SetColor(SceneObjectPart part, LSL_Vector color, int face)
{ {
if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted) if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted)
return; return;
Primitive.TextureEntry tex = part.Shape.Textures; Primitive.TextureEntry tex = part.Shape.Textures;
@ -1471,8 +1472,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
} }
public void SetTexGen(SceneObjectPart part, int face,int style) public void SetTexGen(SceneObjectPart part, int face,int style)
{ {
if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted) if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted)
return; return;
Primitive.TextureEntry tex = part.Shape.Textures; Primitive.TextureEntry tex = part.Shape.Textures;
@ -1504,8 +1505,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
} }
public void SetGlow(SceneObjectPart part, int face, float glow) public void SetGlow(SceneObjectPart part, int face, float glow)
{ {
if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted) if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted)
return; return;
Primitive.TextureEntry tex = part.Shape.Textures; Primitive.TextureEntry tex = part.Shape.Textures;
@ -1532,8 +1533,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
} }
public void SetShiny(SceneObjectPart part, int face, int shiny, Bumpiness bump) public void SetShiny(SceneObjectPart part, int face, int shiny, Bumpiness bump)
{ {
if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted) if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted)
return; return;
Shininess sval = new Shininess(); Shininess sval = new Shininess();
@ -1584,8 +1585,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
} }
public void SetFullBright(SceneObjectPart part, int face, bool bright) public void SetFullBright(SceneObjectPart part, int face, bool bright)
{ {
if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted) if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted)
return; return;
Primitive.TextureEntry tex = part.Shape.Textures; Primitive.TextureEntry tex = part.Shape.Textures;
@ -1654,8 +1655,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
} }
protected void SetAlpha(SceneObjectPart part, double alpha, int face) protected void SetAlpha(SceneObjectPart part, double alpha, int face)
{ {
if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted) if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted)
return; return;
Primitive.TextureEntry tex = part.Shape.Textures; Primitive.TextureEntry tex = part.Shape.Textures;
@ -1702,8 +1703,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
/// <param name="Force"></param> /// <param name="Force"></param>
protected void SetFlexi(SceneObjectPart part, bool flexi, int softness, float gravity, float friction, protected void SetFlexi(SceneObjectPart part, bool flexi, int softness, float gravity, float friction,
float wind, float tension, LSL_Vector Force) float wind, float tension, LSL_Vector Force)
{ {
if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted) if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted)
return; return;
if (flexi) if (flexi)
@ -1737,8 +1738,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
/// <param name="radius"></param> /// <param name="radius"></param>
/// <param name="falloff"></param> /// <param name="falloff"></param>
protected void SetPointLight(SceneObjectPart part, bool light, LSL_Vector color, float intensity, float radius, float falloff) protected void SetPointLight(SceneObjectPart part, bool light, LSL_Vector color, float intensity, float radius, float falloff)
{ {
if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted) if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted)
return; return;
if (light) if (light)
@ -1823,8 +1824,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
} }
protected void SetTexture(SceneObjectPart part, string texture, int face) protected void SetTexture(SceneObjectPart part, string texture, int face)
{ {
if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted) if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted)
return; return;
UUID textureID=new UUID(); UUID textureID=new UUID();
@ -1871,8 +1872,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
} }
protected void ScaleTexture(SceneObjectPart part, double u, double v, int face) protected void ScaleTexture(SceneObjectPart part, double u, double v, int face)
{ {
if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted) if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted)
return; return;
Primitive.TextureEntry tex = part.Shape.Textures; Primitive.TextureEntry tex = part.Shape.Textures;
@ -1910,8 +1911,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
} }
protected void OffsetTexture(SceneObjectPart part, double u, double v, int face) protected void OffsetTexture(SceneObjectPart part, double u, double v, int face)
{ {
if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted) if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted)
return; return;
Primitive.TextureEntry tex = part.Shape.Textures; Primitive.TextureEntry tex = part.Shape.Textures;
@ -1949,8 +1950,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
} }
protected void RotateTexture(SceneObjectPart part, double rotation, int face) protected void RotateTexture(SceneObjectPart part, double rotation, int face)
{ {
if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted) if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted)
return; return;
Primitive.TextureEntry tex = part.Shape.Textures; Primitive.TextureEntry tex = part.Shape.Textures;
@ -2022,8 +2023,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
} }
protected void SetPos(SceneObjectPart part, LSL_Vector targetPos) protected void SetPos(SceneObjectPart part, LSL_Vector targetPos)
{ {
if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted) if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted)
return; return;
// Capped movemment if distance > 10m (http://wiki.secondlife.com/wiki/LlSetPos) // Capped movemment if distance > 10m (http://wiki.secondlife.com/wiki/LlSetPos)
@ -2119,8 +2120,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
} }
protected void SetRot(SceneObjectPart part, Quaternion rot) protected void SetRot(SceneObjectPart part, Quaternion rot)
{ {
if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted) if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted)
return; return;
part.UpdateRotation(rot); part.UpdateRotation(rot);
@ -4019,7 +4020,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
bucket); bucket);
if (m_TransferModule != null) if (m_TransferModule != null)
m_TransferModule.SendInstantMessage(msg, delegate(bool success) {}); m_TransferModule.SendInstantMessage(msg, delegate(bool success) {});
//This delay should only occur when giving inventory to avatars. //This delay should only occur when giving inventory to avatars.
ScriptSleep(3000); ScriptSleep(3000);
@ -4194,6 +4195,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
ScenePresence presence = World.GetScenePresence(agentId); ScenePresence presence = World.GetScenePresence(agentId);
if (presence != null) if (presence != null)
{ {
// agent must not be a god
if (presence.GodLevel >= 200) return;
// agent must be over the owners land // agent must be over the owners land
if (m_host.OwnerID == World.LandChannel.GetLandObject( if (m_host.OwnerID == World.LandChannel.GetLandObject(
presence.AbsolutePosition.X, presence.AbsolutePosition.Y).LandData.OwnerID) presence.AbsolutePosition.X, presence.AbsolutePosition.Y).LandData.OwnerID)
@ -6689,9 +6693,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
} }
protected ObjectShapePacket.ObjectDataBlock SetPrimitiveBlockShapeParams(SceneObjectPart part, int holeshape, LSL_Vector cut, float hollow, LSL_Vector twist) protected ObjectShapePacket.ObjectDataBlock SetPrimitiveBlockShapeParams(SceneObjectPart part, int holeshape, LSL_Vector cut, float hollow, LSL_Vector twist)
{ {
ObjectShapePacket.ObjectDataBlock shapeBlock = new ObjectShapePacket.ObjectDataBlock(); ObjectShapePacket.ObjectDataBlock shapeBlock = new ObjectShapePacket.ObjectDataBlock();
if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted) if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted)
return shapeBlock; return shapeBlock;
if (holeshape != (int)ScriptBaseClass.PRIM_HOLE_DEFAULT && if (holeshape != (int)ScriptBaseClass.PRIM_HOLE_DEFAULT &&
@ -6762,8 +6766,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
} }
protected void SetPrimitiveShapeParams(SceneObjectPart part, int holeshape, LSL_Vector cut, float hollow, LSL_Vector twist, LSL_Vector taper_b, LSL_Vector topshear, byte fudge) protected void SetPrimitiveShapeParams(SceneObjectPart part, int holeshape, LSL_Vector cut, float hollow, LSL_Vector twist, LSL_Vector taper_b, LSL_Vector topshear, byte fudge)
{ {
if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted) if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted)
return; return;
ObjectShapePacket.ObjectDataBlock shapeBlock; ObjectShapePacket.ObjectDataBlock shapeBlock;
@ -6814,8 +6818,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
} }
protected void SetPrimitiveShapeParams(SceneObjectPart part, int holeshape, LSL_Vector cut, float hollow, LSL_Vector twist, LSL_Vector dimple, byte fudge) protected void SetPrimitiveShapeParams(SceneObjectPart part, int holeshape, LSL_Vector cut, float hollow, LSL_Vector twist, LSL_Vector dimple, byte fudge)
{ {
if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted) if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted)
return; return;
ObjectShapePacket.ObjectDataBlock shapeBlock; ObjectShapePacket.ObjectDataBlock shapeBlock;
@ -6859,8 +6863,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
} }
protected void SetPrimitiveShapeParams(SceneObjectPart part, int holeshape, LSL_Vector cut, float hollow, LSL_Vector twist, LSL_Vector holesize, LSL_Vector topshear, LSL_Vector profilecut, LSL_Vector taper_a, float revolutions, float radiusoffset, float skew, byte fudge) protected void SetPrimitiveShapeParams(SceneObjectPart part, int holeshape, LSL_Vector cut, float hollow, LSL_Vector twist, LSL_Vector holesize, LSL_Vector topshear, LSL_Vector profilecut, LSL_Vector taper_a, float revolutions, float radiusoffset, float skew, byte fudge)
{ {
if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted) if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted)
return; return;
ObjectShapePacket.ObjectDataBlock shapeBlock; ObjectShapePacket.ObjectDataBlock shapeBlock;
@ -6983,8 +6987,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
} }
protected void SetPrimitiveShapeParams(SceneObjectPart part, string map, int type) protected void SetPrimitiveShapeParams(SceneObjectPart part, string map, int type)
{ {
if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted) if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted)
return; return;
ObjectShapePacket.ObjectDataBlock shapeBlock = new ObjectShapePacket.ObjectDataBlock(); ObjectShapePacket.ObjectDataBlock shapeBlock = new ObjectShapePacket.ObjectDataBlock();
@ -7020,13 +7024,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
} }
public void llSetPrimitiveParams(LSL_List rules) public void llSetPrimitiveParams(LSL_List rules)
{ {
m_host.AddScriptLPS(1); m_host.AddScriptLPS(1);
SetPrimParams(m_host, rules); SetPrimParams(m_host, rules);
} }
public void llSetLinkPrimitiveParams(int linknumber, LSL_List rules) public void llSetLinkPrimitiveParams(int linknumber, LSL_List rules)
{ {
m_host.AddScriptLPS(1); m_host.AddScriptLPS(1);
List<SceneObjectPart> parts = GetLinkParts(linknumber); List<SceneObjectPart> parts = GetLinkParts(linknumber);
@ -7041,8 +7045,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
} }
protected void SetPrimParams(SceneObjectPart part, LSL_List rules) protected void SetPrimParams(SceneObjectPart part, LSL_List rules)
{ {
if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted) if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted)
return; return;
int idx = 0; int idx = 0;
@ -7875,96 +7879,96 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
} }
break; break;
case (int)ScriptBaseClass.PRIM_BUMP_SHINY: case (int)ScriptBaseClass.PRIM_BUMP_SHINY:
if (remain < 1) if (remain < 1)
return res; return res;
face = (int)rules.GetLSLIntegerItem(idx++); face = (int)rules.GetLSLIntegerItem(idx++);
tex = part.Shape.Textures; tex = part.Shape.Textures;
int shiny; int shiny;
if (face == ScriptBaseClass.ALL_SIDES) if (face == ScriptBaseClass.ALL_SIDES)
{ {
for (face = 0; face < GetNumberOfSides(part); face++) for (face = 0; face < GetNumberOfSides(part); face++)
{ {
Shininess shinyness = tex.GetFace((uint)face).Shiny; Shininess shinyness = tex.GetFace((uint)face).Shiny;
if (shinyness == Shininess.High) if (shinyness == Shininess.High)
{ {
shiny = ScriptBaseClass.PRIM_SHINY_HIGH; shiny = ScriptBaseClass.PRIM_SHINY_HIGH;
} }
else if (shinyness == Shininess.Medium) else if (shinyness == Shininess.Medium)
{ {
shiny = ScriptBaseClass.PRIM_SHINY_MEDIUM; shiny = ScriptBaseClass.PRIM_SHINY_MEDIUM;
} }
else if (shinyness == Shininess.Low) else if (shinyness == Shininess.Low)
{ {
shiny = ScriptBaseClass.PRIM_SHINY_LOW; shiny = ScriptBaseClass.PRIM_SHINY_LOW;
} }
else else
{ {
shiny = ScriptBaseClass.PRIM_SHINY_NONE; shiny = ScriptBaseClass.PRIM_SHINY_NONE;
} }
res.Add(new LSL_Integer(shiny)); res.Add(new LSL_Integer(shiny));
res.Add(new LSL_Integer((int)tex.GetFace((uint)face).Bump)); res.Add(new LSL_Integer((int)tex.GetFace((uint)face).Bump));
} }
} }
else else
{ {
Shininess shinyness = tex.GetFace((uint)face).Shiny; Shininess shinyness = tex.GetFace((uint)face).Shiny;
if (shinyness == Shininess.High) if (shinyness == Shininess.High)
{ {
shiny = ScriptBaseClass.PRIM_SHINY_HIGH; shiny = ScriptBaseClass.PRIM_SHINY_HIGH;
} }
else if (shinyness == Shininess.Medium) else if (shinyness == Shininess.Medium)
{ {
shiny = ScriptBaseClass.PRIM_SHINY_MEDIUM; shiny = ScriptBaseClass.PRIM_SHINY_MEDIUM;
} }
else if (shinyness == Shininess.Low) else if (shinyness == Shininess.Low)
{ {
shiny = ScriptBaseClass.PRIM_SHINY_LOW; shiny = ScriptBaseClass.PRIM_SHINY_LOW;
} }
else else
{ {
shiny = ScriptBaseClass.PRIM_SHINY_NONE; shiny = ScriptBaseClass.PRIM_SHINY_NONE;
} }
res.Add(new LSL_Integer(shiny)); res.Add(new LSL_Integer(shiny));
res.Add(new LSL_Integer((int)tex.GetFace((uint)face).Bump)); res.Add(new LSL_Integer((int)tex.GetFace((uint)face).Bump));
} }
break; break;
case (int)ScriptBaseClass.PRIM_FULLBRIGHT: case (int)ScriptBaseClass.PRIM_FULLBRIGHT:
if (remain < 1) if (remain < 1)
return res; return res;
face = (int)rules.GetLSLIntegerItem(idx++); face = (int)rules.GetLSLIntegerItem(idx++);
tex = part.Shape.Textures; tex = part.Shape.Textures;
int fullbright; int fullbright;
if (face == ScriptBaseClass.ALL_SIDES) if (face == ScriptBaseClass.ALL_SIDES)
{ {
for (face = 0; face < GetNumberOfSides(part); face++) for (face = 0; face < GetNumberOfSides(part); face++)
{ {
if (tex.GetFace((uint)face).Fullbright == true) if (tex.GetFace((uint)face).Fullbright == true)
{ {
fullbright = ScriptBaseClass.TRUE; fullbright = ScriptBaseClass.TRUE;
} }
else else
{ {
fullbright = ScriptBaseClass.FALSE; fullbright = ScriptBaseClass.FALSE;
} }
res.Add(new LSL_Integer(fullbright)); res.Add(new LSL_Integer(fullbright));
} }
} }
else else
{ {
if (tex.GetFace((uint)face).Fullbright == true) if (tex.GetFace((uint)face).Fullbright == true)
{ {
fullbright = ScriptBaseClass.TRUE; fullbright = ScriptBaseClass.TRUE;
} }
else else
{ {
fullbright = ScriptBaseClass.FALSE; fullbright = ScriptBaseClass.FALSE;
} }
res.Add(new LSL_Integer(fullbright)); res.Add(new LSL_Integer(fullbright));
} }
break; break;
case (int)ScriptBaseClass.PRIM_FLEXIBLE: case (int)ScriptBaseClass.PRIM_FLEXIBLE:
@ -7985,37 +7989,37 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
break; break;
case (int)ScriptBaseClass.PRIM_TEXGEN: case (int)ScriptBaseClass.PRIM_TEXGEN:
// (PRIM_TEXGEN_DEFAULT, PRIM_TEXGEN_PLANAR) // (PRIM_TEXGEN_DEFAULT, PRIM_TEXGEN_PLANAR)
if (remain < 1) if (remain < 1)
return res; return res;
face = (int)rules.GetLSLIntegerItem(idx++); face = (int)rules.GetLSLIntegerItem(idx++);
tex = part.Shape.Textures; tex = part.Shape.Textures;
if (face == ScriptBaseClass.ALL_SIDES) if (face == ScriptBaseClass.ALL_SIDES)
{ {
for (face = 0; face < GetNumberOfSides(part); face++) for (face = 0; face < GetNumberOfSides(part); face++)
{ {
if (tex.GetFace((uint)face).TexMapType == MappingType.Planar) if (tex.GetFace((uint)face).TexMapType == MappingType.Planar)
{ {
res.Add(new LSL_Integer(ScriptBaseClass.PRIM_TEXGEN_PLANAR)); res.Add(new LSL_Integer(ScriptBaseClass.PRIM_TEXGEN_PLANAR));
} }
else else
{ {
res.Add(new LSL_Integer(ScriptBaseClass.PRIM_TEXGEN_DEFAULT)); res.Add(new LSL_Integer(ScriptBaseClass.PRIM_TEXGEN_DEFAULT));
} }
} }
} }
else else
{ {
if (tex.GetFace((uint)face).TexMapType == MappingType.Planar) if (tex.GetFace((uint)face).TexMapType == MappingType.Planar)
{ {
res.Add(new LSL_Integer(ScriptBaseClass.PRIM_TEXGEN_PLANAR)); res.Add(new LSL_Integer(ScriptBaseClass.PRIM_TEXGEN_PLANAR));
} }
else else
{ {
res.Add(new LSL_Integer(ScriptBaseClass.PRIM_TEXGEN_DEFAULT)); res.Add(new LSL_Integer(ScriptBaseClass.PRIM_TEXGEN_DEFAULT));
} }
} }
break; break;
case (int)ScriptBaseClass.PRIM_POINT_LIGHT: case (int)ScriptBaseClass.PRIM_POINT_LIGHT:
@ -8033,26 +8037,26 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
res.Add(new LSL_Float(shape.LightFalloff)); // falloff res.Add(new LSL_Float(shape.LightFalloff)); // falloff
break; break;
case (int)ScriptBaseClass.PRIM_GLOW: case (int)ScriptBaseClass.PRIM_GLOW:
if (remain < 1) if (remain < 1)
return res; return res;
face = (int)rules.GetLSLIntegerItem(idx++); face = (int)rules.GetLSLIntegerItem(idx++);
tex = part.Shape.Textures; tex = part.Shape.Textures;
float primglow; float primglow;
if (face == ScriptBaseClass.ALL_SIDES) if (face == ScriptBaseClass.ALL_SIDES)
{ {
for (face = 0; face < GetNumberOfSides(part); face++) for (face = 0; face < GetNumberOfSides(part); face++)
{ {
primglow = tex.GetFace((uint)face).Glow; primglow = tex.GetFace((uint)face).Glow;
res.Add(new LSL_Float(primglow)); res.Add(new LSL_Float(primglow));
} }
} }
else else
{ {
primglow = tex.GetFace((uint)face).Glow; primglow = tex.GetFace((uint)face).Glow;
res.Add(new LSL_Float(primglow)); res.Add(new LSL_Float(primglow));
} }
break; break;
case (int)ScriptBaseClass.PRIM_TEXT: case (int)ScriptBaseClass.PRIM_TEXT:
Color4 textColor = part.GetTextColor(); Color4 textColor = part.GetTextColor();
@ -9214,7 +9218,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
m_host.AddScriptLPS(1); m_host.AddScriptLPS(1);
if (quick_pay_buttons.Data.Length < 4) if (quick_pay_buttons.Data.Length < 4)
{ {
int x; int x;
for (x=quick_pay_buttons.Data.Length; x<= 4; x++) for (x=quick_pay_buttons.Data.Length; x<= 4; x++)
{ {
@ -9222,12 +9226,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
} }
} }
int[] nPrice = new int[5]; int[] nPrice = new int[5];
nPrice[0]=price; nPrice[0]=price;
nPrice[1] = (LSL_Integer)quick_pay_buttons.Data[0]; nPrice[1] = (LSL_Integer)quick_pay_buttons.Data[0];
nPrice[2] = (LSL_Integer)quick_pay_buttons.Data[1]; nPrice[2] = (LSL_Integer)quick_pay_buttons.Data[1];
nPrice[3] = (LSL_Integer)quick_pay_buttons.Data[2]; nPrice[3] = (LSL_Integer)quick_pay_buttons.Data[2];
nPrice[4] = (LSL_Integer)quick_pay_buttons.Data[3]; nPrice[4] = (LSL_Integer)quick_pay_buttons.Data[3];
m_host.ParentGroup.RootPart.PayPrice = nPrice; m_host.ParentGroup.RootPart.PayPrice = nPrice;
m_host.ParentGroup.HasGroupChanged = true; m_host.ParentGroup.HasGroupChanged = true;
} }

View File

@ -26,6 +26,7 @@
*/ */
using System; using System;
using System.Diagnostics; //for [DebuggerNonUserCode]
using System.Runtime.Remoting.Lifetime; using System.Runtime.Remoting.Lifetime;
using System.Threading; using System.Threading;
using System.Reflection; using System.Reflection;
@ -309,6 +310,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
m_LSL_Functions.llDialog(avatar, message, buttons, chat_channel); m_LSL_Functions.llDialog(avatar, message, buttons, chat_channel);
} }
[DebuggerNonUserCode]
public void llDie() public void llDie()
{ {
m_LSL_Functions.llDie(); m_LSL_Functions.llDie();