mirror of
https://github.com/opensim/opensim.git
synced 2026-08-06 01:06:30 +08:00
Merge branch '0.6.9-post-fixes' into careminster
This commit is contained in:
@@ -1252,7 +1252,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
|
||||
if ((status & ScriptBaseClass.STATUS_BLOCK_GRAB) == ScriptBaseClass.STATUS_BLOCK_GRAB)
|
||||
{
|
||||
NotImplemented("llSetStatus - STATUS_BLOCK_GRAB");
|
||||
if (value != 0)
|
||||
m_host.SetBlockGrab(true);
|
||||
else
|
||||
m_host.SetBlockGrab(false);
|
||||
}
|
||||
|
||||
if ((status & ScriptBaseClass.STATUS_DIE_AT_EDGE) == ScriptBaseClass.STATUS_DIE_AT_EDGE)
|
||||
@@ -1265,12 +1268,18 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
|
||||
if ((status & ScriptBaseClass.STATUS_RETURN_AT_EDGE) == ScriptBaseClass.STATUS_RETURN_AT_EDGE)
|
||||
{
|
||||
NotImplemented("llSetStatus - STATUS_RETURN_AT_EDGE");
|
||||
if (value != 0)
|
||||
m_host.SetReturnAtEdge(true);
|
||||
else
|
||||
m_host.SetReturnAtEdge(false);
|
||||
}
|
||||
|
||||
if ((status & ScriptBaseClass.STATUS_SANDBOX) == ScriptBaseClass.STATUS_SANDBOX)
|
||||
{
|
||||
NotImplemented("llSetStatus - STATUS_SANDBOX");
|
||||
if (value != 0)
|
||||
m_host.SetStatusSandbox(true);
|
||||
else
|
||||
m_host.SetStatusSandbox(false);
|
||||
}
|
||||
|
||||
if (statusrotationaxis != 0)
|
||||
@@ -1307,8 +1316,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
return 0;
|
||||
|
||||
case ScriptBaseClass.STATUS_BLOCK_GRAB:
|
||||
NotImplemented("llGetStatus - STATUS_BLOCK_GRAB");
|
||||
return 0;
|
||||
if (m_host.GetBlockGrab())
|
||||
return 1;
|
||||
else
|
||||
return 0;
|
||||
|
||||
case ScriptBaseClass.STATUS_DIE_AT_EDGE:
|
||||
if (m_host.GetDieAtEdge())
|
||||
@@ -1317,24 +1328,34 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
return 0;
|
||||
|
||||
case ScriptBaseClass.STATUS_RETURN_AT_EDGE:
|
||||
NotImplemented("llGetStatus - STATUS_RETURN_AT_EDGE");
|
||||
return 0;
|
||||
if (m_host.GetReturnAtEdge())
|
||||
return 1;
|
||||
else
|
||||
return 0;
|
||||
|
||||
case ScriptBaseClass.STATUS_ROTATE_X:
|
||||
NotImplemented("llGetStatus - STATUS_ROTATE_X");
|
||||
return 0;
|
||||
if (m_host.GetAxisRotation(2) == 2)
|
||||
return 1;
|
||||
else
|
||||
return 0;
|
||||
|
||||
case ScriptBaseClass.STATUS_ROTATE_Y:
|
||||
NotImplemented("llGetStatus - STATUS_ROTATE_Y");
|
||||
return 0;
|
||||
if (m_host.GetAxisRotation(4) == 4)
|
||||
return 1;
|
||||
else
|
||||
return 0;
|
||||
|
||||
case ScriptBaseClass.STATUS_ROTATE_Z:
|
||||
NotImplemented("llGetStatus - STATUS_ROTATE_Z");
|
||||
return 0;
|
||||
if (m_host.GetAxisRotation(8) == 8)
|
||||
return 1;
|
||||
else
|
||||
return 0;
|
||||
|
||||
case ScriptBaseClass.STATUS_SANDBOX:
|
||||
NotImplemented("llGetStatus - STATUS_SANDBOX");
|
||||
return 0;
|
||||
if (m_host.GetStatusSandbox())
|
||||
return 1;
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@@ -2346,7 +2367,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
m_host.AddScriptLPS(1);
|
||||
|
||||
// send the sound, once, to all clients in range
|
||||
m_host.SendSound(KeyOrName(sound).ToString(), volume, false, 0);
|
||||
m_host.SendSound(KeyOrName(sound).ToString(), volume, false, 0, 0, false, false);
|
||||
}
|
||||
|
||||
// Xantor 20080528 we should do this differently.
|
||||
@@ -2376,42 +2397,98 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
public void llLoopSoundMaster(string sound, double volume)
|
||||
{
|
||||
m_host.AddScriptLPS(1);
|
||||
NotImplemented("llLoopSoundMaster");
|
||||
m_host.ParentGroup.LoopSoundMasterPrim = m_host;
|
||||
lock (m_host.ParentGroup.LoopSoundSlavePrims)
|
||||
{
|
||||
foreach (SceneObjectPart prim in m_host.ParentGroup.LoopSoundSlavePrims)
|
||||
{
|
||||
if (prim.Sound != UUID.Zero)
|
||||
llStopSound();
|
||||
|
||||
prim.Sound = KeyOrName(sound);
|
||||
prim.SoundGain = volume;
|
||||
prim.SoundFlags = 1; // looping
|
||||
prim.SoundRadius = 20; // Magic number, 20 seems reasonable. Make configurable?
|
||||
|
||||
prim.ScheduleFullUpdate();
|
||||
prim.SendFullUpdateToAllClients();
|
||||
}
|
||||
}
|
||||
if (m_host.Sound != UUID.Zero)
|
||||
llStopSound();
|
||||
|
||||
m_host.Sound = KeyOrName(sound);
|
||||
m_host.SoundGain = volume;
|
||||
m_host.SoundFlags = 1; // looping
|
||||
m_host.SoundRadius = 20; // Magic number, 20 seems reasonable. Make configurable?
|
||||
|
||||
m_host.ScheduleFullUpdate();
|
||||
m_host.SendFullUpdateToAllClients();
|
||||
}
|
||||
|
||||
public void llLoopSoundSlave(string sound, double volume)
|
||||
{
|
||||
m_host.AddScriptLPS(1);
|
||||
NotImplemented("llLoopSoundSlave");
|
||||
lock (m_host.ParentGroup.LoopSoundSlavePrims)
|
||||
{
|
||||
m_host.ParentGroup.LoopSoundSlavePrims.Add(m_host);
|
||||
}
|
||||
}
|
||||
|
||||
public void llPlaySoundSlave(string sound, double volume)
|
||||
{
|
||||
m_host.AddScriptLPS(1);
|
||||
NotImplemented("llPlaySoundSlave");
|
||||
|
||||
// send the sound, once, to all clients in range
|
||||
m_host.SendSound(KeyOrName(sound).ToString(), volume, false, 0, 0, true, false);
|
||||
}
|
||||
|
||||
public void llTriggerSound(string sound, double volume)
|
||||
{
|
||||
m_host.AddScriptLPS(1);
|
||||
// send the sound, once, to all clients in range
|
||||
m_host.SendSound(KeyOrName(sound).ToString(), volume, true, 0);
|
||||
m_host.SendSound(KeyOrName(sound).ToString(), volume, true, 0, 0, false, false);
|
||||
}
|
||||
|
||||
// Xantor 20080528: Clear prim data of sound instead
|
||||
public void llStopSound()
|
||||
{
|
||||
m_host.AddScriptLPS(1);
|
||||
|
||||
m_host.Sound = UUID.Zero;
|
||||
m_host.SoundGain = 0;
|
||||
m_host.SoundFlags = 0;
|
||||
m_host.SoundRadius = 0;
|
||||
|
||||
m_host.ScheduleFullUpdate();
|
||||
m_host.SendFullUpdateToAllClients();
|
||||
|
||||
// m_host.SendSound(UUID.Zero.ToString(), 1.0, false, 2);
|
||||
if (m_host.ParentGroup.LoopSoundSlavePrims.Contains(m_host))
|
||||
{
|
||||
if (m_host.ParentGroup.LoopSoundMasterPrim == m_host)
|
||||
{
|
||||
foreach (SceneObjectPart part in m_host.ParentGroup.LoopSoundSlavePrims)
|
||||
{
|
||||
part.Sound = UUID.Zero;
|
||||
part.SoundGain = 0;
|
||||
part.SoundFlags = 0;
|
||||
part.SoundRadius = 0;
|
||||
part.ScheduleFullUpdate();
|
||||
part.SendFullUpdateToAllClients();
|
||||
}
|
||||
m_host.ParentGroup.LoopSoundMasterPrim = null;
|
||||
m_host.ParentGroup.LoopSoundSlavePrims.Clear();
|
||||
}
|
||||
else
|
||||
{
|
||||
m_host.Sound = UUID.Zero;
|
||||
m_host.SoundGain = 0;
|
||||
m_host.SoundFlags = 0;
|
||||
m_host.SoundRadius = 0;
|
||||
m_host.ScheduleFullUpdate();
|
||||
m_host.SendFullUpdateToAllClients();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
m_host.Sound = UUID.Zero;
|
||||
m_host.SoundGain = 0;
|
||||
m_host.SoundFlags = 0;
|
||||
m_host.SoundRadius = 0;
|
||||
m_host.ScheduleFullUpdate();
|
||||
m_host.SendFullUpdateToAllClients();
|
||||
}
|
||||
}
|
||||
|
||||
public void llPreloadSound(string sound)
|
||||
@@ -2803,8 +2880,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
|
||||
public void llLookAt(LSL_Vector target, double strength, double damping)
|
||||
{
|
||||
// partial implementation, rotates objects correctly but does not apply strength or damping attributes
|
||||
|
||||
m_host.AddScriptLPS(1);
|
||||
// Determine where we are looking from
|
||||
LSL_Vector from = llGetPos();
|
||||
@@ -2824,9 +2899,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
// the angles of rotation in radians into rotation value
|
||||
|
||||
LSL_Types.Quaternion rot = llEuler2Rot(angle);
|
||||
|
||||
Quaternion rotation = new Quaternion((float)rot.x, (float)rot.y, (float)rot.z, (float)rot.s);
|
||||
m_host.startLookAt(rotation, (float)damping, (float)strength);
|
||||
// Orient the object to the angle calculated
|
||||
llSetRot(rot);
|
||||
//llSetRot(rot);
|
||||
}
|
||||
|
||||
public void llRotLookAt(LSL_Rotation target, double strength, double damping)
|
||||
@@ -3329,13 +3405,17 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
public void llPointAt(LSL_Vector pos)
|
||||
{
|
||||
m_host.AddScriptLPS(1);
|
||||
NotImplemented("llPointAt");
|
||||
ScenePresence Owner = World.GetScenePresence(m_host.UUID);
|
||||
LSL_Rotation rot = llEuler2Rot(pos);
|
||||
Owner.PreviousRotation = Owner.Rotation;
|
||||
Owner.Rotation = (new Quaternion((float)rot.x,(float)rot.y,(float)rot.z,(float)rot.s));
|
||||
}
|
||||
|
||||
public void llStopPointAt()
|
||||
{
|
||||
m_host.AddScriptLPS(1);
|
||||
NotImplemented("llStopPointAt");
|
||||
ScenePresence Owner = m_host.ParentGroup.Scene.GetScenePresence(m_host.OwnerID);
|
||||
Owner.Rotation = Owner.PreviousRotation;
|
||||
}
|
||||
|
||||
public void llTargetOmega(LSL_Vector axis, double spinrate, double gain)
|
||||
@@ -4138,8 +4218,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
public void llCollisionSound(string impact_sound, double impact_volume)
|
||||
{
|
||||
m_host.AddScriptLPS(1);
|
||||
//NotImplemented("llCollisionSound");
|
||||
|
||||
// TODO: Parameter check logic required.
|
||||
UUID soundId = UUID.Zero;
|
||||
if (!UUID.TryParse(impact_sound, out soundId))
|
||||
@@ -4727,8 +4805,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
public LSL_Vector llGetCenterOfMass()
|
||||
{
|
||||
m_host.AddScriptLPS(1);
|
||||
NotImplemented("llGetCenterOfMass");
|
||||
return new LSL_Vector();
|
||||
Vector3 center = m_host.GetGeometricCenter();
|
||||
return new LSL_Vector(center.X,center.Y,center.Z);
|
||||
}
|
||||
|
||||
public LSL_List llListSort(LSL_List src, int stride, int ascending)
|
||||
@@ -5461,8 +5539,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
flags |= ScriptBaseClass.AGENT_SITTING;
|
||||
}
|
||||
|
||||
//NotImplemented("llGetAgentInfo");
|
||||
|
||||
return flags;
|
||||
}
|
||||
|
||||
@@ -5522,12 +5598,31 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
public void llSetTextureAnim(int mode, int face, int sizex, int sizey, double start, double length, double rate)
|
||||
{
|
||||
m_host.AddScriptLPS(1);
|
||||
|
||||
SetTextureAnim(m_host, mode, face, sizex, sizey, start, length, rate);
|
||||
}
|
||||
|
||||
public void llSetLinkTextureAnim(int linknumber, int mode, int face, int sizex, int sizey, double start, double length, double rate)
|
||||
{
|
||||
m_host.AddScriptLPS(1);
|
||||
|
||||
List<SceneObjectPart> parts = GetLinkParts(linknumber);
|
||||
|
||||
foreach (var part in parts)
|
||||
{
|
||||
SetTextureAnim(part, mode, face, sizex, sizey, start, length, rate);
|
||||
}
|
||||
}
|
||||
|
||||
private void SetTextureAnim(SceneObjectPart part, int mode, int face, int sizex, int sizey, double start, double length, double rate)
|
||||
{
|
||||
|
||||
Primitive.TextureAnimation pTexAnim = new Primitive.TextureAnimation();
|
||||
pTexAnim.Flags = (Primitive.TextureAnimMode)mode;
|
||||
|
||||
//ALL_SIDES
|
||||
if (face == ScriptBaseClass.ALL_SIDES)
|
||||
face = 255;
|
||||
face = 255;
|
||||
|
||||
pTexAnim.Face = (uint)face;
|
||||
pTexAnim.Length = (float)length;
|
||||
@@ -5536,16 +5631,19 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
pTexAnim.SizeY = (uint)sizey;
|
||||
pTexAnim.Start = (float)start;
|
||||
|
||||
m_host.AddTextureAnimation(pTexAnim);
|
||||
m_host.SendFullUpdateToAllClients();
|
||||
m_host.ParentGroup.HasGroupChanged = true;
|
||||
part.AddTextureAnimation(pTexAnim);
|
||||
part.SendFullUpdateToAllClients();
|
||||
part.ParentGroup.HasGroupChanged = true;
|
||||
}
|
||||
|
||||
public void llTriggerSoundLimited(string sound, double volume, LSL_Vector top_north_east,
|
||||
LSL_Vector bottom_south_west)
|
||||
{
|
||||
m_host.AddScriptLPS(1);
|
||||
NotImplemented("llTriggerSoundLimited");
|
||||
float radius1 = (float)llVecDist(llGetPos(), top_north_east);
|
||||
float radius2 = (float)llVecDist(llGetPos(), bottom_south_west);
|
||||
float radius = Math.Abs(radius1 - radius2);
|
||||
m_host.SendSound(KeyOrName(sound).ToString(), volume, true, 0, radius, false, false);
|
||||
}
|
||||
|
||||
public void llEjectFromLand(string pest)
|
||||
@@ -5932,13 +6030,31 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
return ps;
|
||||
}
|
||||
|
||||
public void llLinkParticleSystem(int linknumber, LSL_List rules)
|
||||
{
|
||||
m_host.AddScriptLPS(1);
|
||||
|
||||
List<SceneObjectPart> parts = GetLinkParts(linknumber);
|
||||
|
||||
foreach (var part in parts)
|
||||
{
|
||||
SetParticleSystem(part, rules);
|
||||
}
|
||||
}
|
||||
|
||||
public void llParticleSystem(LSL_List rules)
|
||||
{
|
||||
m_host.AddScriptLPS(1);
|
||||
SetParticleSystem(m_host, rules);
|
||||
}
|
||||
|
||||
private void SetParticleSystem(SceneObjectPart part, LSL_List rules) {
|
||||
|
||||
|
||||
if (rules.Length == 0)
|
||||
{
|
||||
m_host.RemoveParticleSystem();
|
||||
m_host.ParentGroup.HasGroupChanged = true;
|
||||
part.RemoveParticleSystem();
|
||||
part.ParentGroup.HasGroupChanged = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -6049,7 +6165,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
}
|
||||
else
|
||||
{
|
||||
prules.Target = m_host.UUID;
|
||||
prules.Target = part.UUID;
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -6075,16 +6191,35 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
}
|
||||
prules.CRC = 1;
|
||||
|
||||
m_host.AddNewParticleSystem(prules);
|
||||
m_host.ParentGroup.HasGroupChanged = true;
|
||||
part.AddNewParticleSystem(prules);
|
||||
part.ParentGroup.HasGroupChanged = true;
|
||||
}
|
||||
m_host.SendFullUpdateToAllClients();
|
||||
part.SendFullUpdateToAllClients();
|
||||
}
|
||||
|
||||
public void llGroundRepel(double height, int water, double tau)
|
||||
{
|
||||
m_host.AddScriptLPS(1);
|
||||
NotImplemented("llGroundRepel");
|
||||
if (m_host.PhysActor != null)
|
||||
{
|
||||
float ground = (float)llGround(new LSL_Types.Vector3(0, 0, 0));
|
||||
float waterLevel = (float)llWater(new LSL_Types.Vector3(0, 0, 0));
|
||||
PIDHoverType hoverType = PIDHoverType.Ground;
|
||||
if (water != 0)
|
||||
{
|
||||
hoverType = PIDHoverType.GroundAndWater;
|
||||
if (ground < waterLevel)
|
||||
height += waterLevel;
|
||||
else
|
||||
height += ground;
|
||||
}
|
||||
else
|
||||
{
|
||||
height += ground;
|
||||
}
|
||||
|
||||
m_host.SetHoverHeight((float)height, hoverType, (float)tau);
|
||||
}
|
||||
}
|
||||
|
||||
protected UUID GetTaskInventoryItem(string name)
|
||||
@@ -6219,7 +6354,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
{
|
||||
if (!m_host.ParentGroup.IsDeleted)
|
||||
{
|
||||
m_host.ParentGroup.RootPart.SetVehicleFlags(flags);
|
||||
m_host.ParentGroup.RootPart.SetVehicleFlags(flags, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -6231,7 +6366,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
{
|
||||
if (!m_host.ParentGroup.IsDeleted)
|
||||
{
|
||||
m_host.ParentGroup.RootPart.RemoveVehicleFlags(flags);
|
||||
m_host.ParentGroup.RootPart.SetVehicleFlags(flags, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -6868,6 +7003,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
SetPrimParams(part, rules);
|
||||
}
|
||||
|
||||
public void llSetLinkPrimitiveParamsFast(int linknumber, LSL_List rules)
|
||||
{
|
||||
llSetLinkPrimitiveParams(linknumber, rules);
|
||||
}
|
||||
|
||||
protected void SetPrimParams(SceneObjectPart part, LSL_List rules)
|
||||
{
|
||||
if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted)
|
||||
@@ -7226,6 +7366,18 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
face = rules.GetLSLIntegerItem(idx++);
|
||||
int style = rules.GetLSLIntegerItem(idx++);
|
||||
SetTexGen(part, face, style);
|
||||
break;
|
||||
case (int)ScriptBaseClass.PRIM_TEXT:
|
||||
if (remain < 3)
|
||||
return;
|
||||
string primText = rules.GetLSLStringItem(idx++);
|
||||
LSL_Vector primTextColor = rules.GetVector3Item(idx++);
|
||||
LSL_Float primTextAlpha = rules.GetLSLFloatItem(idx++);
|
||||
Vector3 av3 = new Vector3(Util.Clip((float)primTextColor.x, 0.0f, 1.0f),
|
||||
Util.Clip((float)primTextColor.y, 0.0f, 1.0f),
|
||||
Util.Clip((float)primTextColor.z, 0.0f, 1.0f));
|
||||
part.SetText(primText, av3, Util.Clip((float)primTextAlpha, 0.0f, 1.0f));
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -7271,7 +7423,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
public void llRemoteDataSetRegion()
|
||||
{
|
||||
m_host.AddScriptLPS(1);
|
||||
NotImplemented("llRemoteDataSetRegion");
|
||||
Deprecated("llRemoteDataSetRegion");
|
||||
}
|
||||
|
||||
public LSL_Float llLog10(double val)
|
||||
@@ -7470,6 +7622,23 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
return GetLinkPrimitiveParams(m_host, rules);
|
||||
}
|
||||
|
||||
public LSL_List llGetLinkPrimitiveParams(int linknumber, LSL_List rules)
|
||||
{
|
||||
m_host.AddScriptLPS(1);
|
||||
|
||||
List<SceneObjectPart> parts = GetLinkParts(linknumber);
|
||||
|
||||
LSL_List res = new LSL_List();
|
||||
|
||||
foreach (var part in parts)
|
||||
{
|
||||
LSL_List partRes = GetLinkPrimitiveParams(part, rules);
|
||||
res += partRes;
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
public LSL_List GetLinkPrimitiveParams(SceneObjectPart part, LSL_List rules)
|
||||
{
|
||||
LSL_List res = new LSL_List();
|
||||
@@ -7853,6 +8022,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
res.Add(new LSL_Float(primglow));
|
||||
}
|
||||
break;
|
||||
case (int)ScriptBaseClass.PRIM_TEXT:
|
||||
Color4 textColor = part.GetTextColor();
|
||||
res.Add(part.Text);
|
||||
res.Add(new LSL_Vector(textColor.R,
|
||||
textColor.G,
|
||||
textColor.B));
|
||||
res.Add(new LSL_Float(textColor.A));
|
||||
break;
|
||||
}
|
||||
}
|
||||
return res;
|
||||
@@ -8409,7 +8586,39 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
public void llSetInventoryPermMask(string item, int mask, int value)
|
||||
{
|
||||
m_host.AddScriptLPS(1);
|
||||
NotImplemented("llSetInventoryPermMask");
|
||||
if (m_ScriptEngine.Config.GetBoolean("AllowGodFunctions", false))
|
||||
{
|
||||
if (World.Permissions.CanRunConsoleCommand(m_host.OwnerID))
|
||||
{
|
||||
lock (m_host.TaskInventory)
|
||||
{
|
||||
foreach (KeyValuePair<UUID, TaskInventoryItem> inv in m_host.TaskInventory)
|
||||
{
|
||||
if (inv.Value.Name == item)
|
||||
{
|
||||
switch (mask)
|
||||
{
|
||||
case 0:
|
||||
inv.Value.BasePermissions = (uint)value;
|
||||
break;
|
||||
case 1:
|
||||
inv.Value.CurrentPermissions = (uint)value;
|
||||
break;
|
||||
case 2:
|
||||
inv.Value.GroupPermissions = (uint)value;
|
||||
break;
|
||||
case 3:
|
||||
inv.Value.EveryonePermissions = (uint)value;
|
||||
break;
|
||||
case 4:
|
||||
inv.Value.NextPermissions = (uint)value;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public LSL_String llGetInventoryCreator(string item)
|
||||
@@ -8843,6 +9052,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
// we send to all
|
||||
landData.MediaID = new UUID(texture);
|
||||
landData.MediaAutoScale = autoAlign ? (byte)1 : (byte)0;
|
||||
landData.MediaSize[0] = width;
|
||||
landData.MediaSize[1] = height;
|
||||
landData.MediaType = mediaType;
|
||||
|
||||
// do that one last, it will cause a ParcelPropertiesUpdate
|
||||
landObject.SetMediaUrl(url);
|
||||
@@ -8902,11 +9114,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
m_host.AddScriptLPS(1);
|
||||
LSL_List list = new LSL_List();
|
||||
//TO DO: make the implementation for the missing commands
|
||||
//PARCEL_MEDIA_COMMAND_TEXTURE key uuid Use this to get or set the parcel's media texture.
|
||||
//PARCEL_MEDIA_COMMAND_URL string url Used to get or set the parcel's media url.
|
||||
//PARCEL_MEDIA_COMMAND_TYPE string mime_type Use this to get or set the parcel media MIME type (e.g. "text/html"). (1.19.1 RC0 or later)
|
||||
//PARCEL_MEDIA_COMMAND_SIZE integer x, integer y Use this to get or set the parcel media pixel resolution. (1.19.1 RC0 or later)
|
||||
//PARCEL_MEDIA_COMMAND_DESC string desc Use this to get or set the parcel media description. (1.19.1 RC0 or later)
|
||||
//PARCEL_MEDIA_COMMAND_LOOP_SET float loop Use this to get or set the parcel's media loop duration. (1.19.1 RC0 or later)
|
||||
for (int i = 0; i < aList.Data.Length; i++)
|
||||
{
|
||||
@@ -8924,6 +9131,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
case ParcelMediaCommandEnum.Texture:
|
||||
list.Add(new LSL_String(World.GetLandData(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).MediaID.ToString()));
|
||||
break;
|
||||
case ParcelMediaCommandEnum.Type:
|
||||
list.Add(new LSL_String(World.GetLandData(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).MediaType));
|
||||
break;
|
||||
case ParcelMediaCommandEnum.Size:
|
||||
list.Add(new LSL_String(World.GetLandData(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).MediaSize[0]));
|
||||
list.Add(new LSL_String(World.GetLandData(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).MediaSize[1]));
|
||||
break;
|
||||
default:
|
||||
ParcelMediaCommandEnum mediaCommandEnum = ParcelMediaCommandEnum.Url;
|
||||
NotImplemented("llParcelMediaQuery parameter do not supported yet: " + Enum.Parse(mediaCommandEnum.GetType() , aList.Data[i].ToString()).ToString());
|
||||
|
||||
@@ -135,6 +135,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
|
||||
LSL_Key llGetLinkKey(int linknum);
|
||||
LSL_String llGetLinkName(int linknum);
|
||||
LSL_Integer llGetLinkNumber();
|
||||
LSL_List llGetLinkPrimitiveParams(int linknum, LSL_List rules);
|
||||
LSL_Integer llGetListEntryType(LSL_List src, int index);
|
||||
LSL_Integer llGetListLength(LSL_List src);
|
||||
LSL_Vector llGetLocalPos();
|
||||
@@ -206,6 +207,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
|
||||
void llInstantMessage(string user, string message);
|
||||
LSL_String llIntegerToBase64(int number);
|
||||
LSL_String llKey2Name(string id);
|
||||
void llLinkParticleSystem(int linknum, LSL_List rules);
|
||||
LSL_String llList2CSV(LSL_List src);
|
||||
LSL_Float llList2Float(LSL_List src, int index);
|
||||
LSL_Integer llList2Integer(LSL_List src, int index);
|
||||
@@ -322,6 +324,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
|
||||
void llSetLinkColor(int linknumber, LSL_Vector color, int face);
|
||||
void llSetLinkPrimitiveParams(int linknumber, LSL_List rules);
|
||||
void llSetLinkTexture(int linknumber, string texture, int face);
|
||||
void llSetLinkTextureAnim(int linknum, int mode, int face, int sizex, int sizey, double start, double length, double rate);
|
||||
void llSetLocalRot(LSL_Rotation rot);
|
||||
void llSetObjectDesc(string desc);
|
||||
void llSetObjectName(string name);
|
||||
@@ -330,6 +333,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
|
||||
void llSetPayPrice(int price, LSL_List quick_pay_buttons);
|
||||
void llSetPos(LSL_Vector pos);
|
||||
void llSetPrimitiveParams(LSL_List rules);
|
||||
void llSetLinkPrimitiveParamsFast(int linknum, LSL_List rules);
|
||||
void llSetPrimURL(string url);
|
||||
void llSetRemoteScriptAccessPin(int pin);
|
||||
void llSetRot(LSL_Rotation rot);
|
||||
|
||||
@@ -160,6 +160,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
|
||||
public const int VEHICLE_BANKING_MIX = 39;
|
||||
public const int VEHICLE_BANKING_TIMESCALE = 40;
|
||||
public const int VEHICLE_REFERENCE_FRAME = 44;
|
||||
public const int VEHICLE_RANGE_BLOCK = 45;
|
||||
public const int VEHICLE_ROLL_FRAME = 46;
|
||||
public const int VEHICLE_FLAG_NO_DEFLECTION_UP = 1;
|
||||
public const int VEHICLE_FLAG_LIMIT_ROLL_ONLY = 2;
|
||||
public const int VEHICLE_FLAG_HOVER_WATER_ONLY = 4;
|
||||
@@ -170,6 +172,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
|
||||
public const int VEHICLE_FLAG_MOUSELOOK_STEER = 128;
|
||||
public const int VEHICLE_FLAG_MOUSELOOK_BANK = 256;
|
||||
public const int VEHICLE_FLAG_CAMERA_DECOUPLED = 512;
|
||||
public const int VEHICLE_FLAG_NO_X = 1024;
|
||||
public const int VEHICLE_FLAG_NO_Y = 2048;
|
||||
public const int VEHICLE_FLAG_NO_Z = 4096;
|
||||
public const int VEHICLE_FLAG_LOCK_HOVER_HEIGHT = 8192;
|
||||
public const int VEHICLE_FLAG_NO_DEFLECTION = 16392;
|
||||
public const int VEHICLE_FLAG_LOCK_ROTATION = 32784;
|
||||
|
||||
public const int INVENTORY_ALL = -1;
|
||||
public const int INVENTORY_NONE = -1;
|
||||
@@ -305,6 +313,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
|
||||
public const int PRIM_CAST_SHADOWS = 24; // Not implemented, here for completeness sake
|
||||
public const int PRIM_POINT_LIGHT = 23; // Huh?
|
||||
public const int PRIM_GLOW = 25;
|
||||
public const int PRIM_TEXT = 26;
|
||||
public const int PRIM_TEXGEN_DEFAULT = 0;
|
||||
public const int PRIM_TEXGEN_PLANAR = 1;
|
||||
|
||||
|
||||
@@ -674,6 +674,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
|
||||
return m_LSL_Functions.llGetPrimitiveParams(rules);
|
||||
}
|
||||
|
||||
public LSL_List llGetLinkPrimitiveParams(int linknum, LSL_List rules)
|
||||
{
|
||||
return m_LSL_Functions.llGetLinkPrimitiveParams(linknum, rules);
|
||||
}
|
||||
|
||||
public LSL_Integer llGetRegionAgentCount()
|
||||
{
|
||||
return m_LSL_Functions.llGetRegionAgentCount();
|
||||
@@ -889,6 +894,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
|
||||
return m_LSL_Functions.llKey2Name(id);
|
||||
}
|
||||
|
||||
public void llLinkParticleSystem(int linknum, LSL_List rules)
|
||||
{
|
||||
m_LSL_Functions.llLinkParticleSystem(linknum, rules);
|
||||
}
|
||||
|
||||
public LSL_String llList2CSV(LSL_List src)
|
||||
{
|
||||
return m_LSL_Functions.llList2CSV(src);
|
||||
@@ -1468,6 +1478,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
|
||||
m_LSL_Functions.llSetLinkTexture(linknumber, texture, face);
|
||||
}
|
||||
|
||||
public void llSetLinkTextureAnim(int linknum, int mode, int face, int sizex, int sizey, double start, double length, double rate)
|
||||
{
|
||||
m_LSL_Functions.llSetLinkTextureAnim(linknum, mode, face, sizex, sizey, start, length, rate);
|
||||
}
|
||||
|
||||
public void llSetLocalRot(LSL_Rotation rot)
|
||||
{
|
||||
m_LSL_Functions.llSetLocalRot(rot);
|
||||
@@ -1508,6 +1523,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
|
||||
m_LSL_Functions.llSetPrimitiveParams(rules);
|
||||
}
|
||||
|
||||
public void llSetLinkPrimitiveParamsFast(int linknum, LSL_List rules)
|
||||
{
|
||||
m_LSL_Functions.llSetLinkPrimitiveParamsFast(linknum, rules);
|
||||
}
|
||||
|
||||
public void llSetPrimURL(string url)
|
||||
{
|
||||
m_LSL_Functions.llSetPrimURL(url);
|
||||
|
||||
Reference in New Issue
Block a user