mirror of
https://github.com/opensim/opensim.git
synced 2026-08-04 16:22:50 +08:00
* This is the fabled LibOMV update with all of the libOMV types from JHurliman
* This is a HUGE OMG update and will definitely have unknown side effects.. so this is really only for the strong hearted at this point. Regular people should let the dust settle. * This has been tested to work with most basic functions. However.. make sure you back up 'everything' before using this. It's that big! * Essentially we're back at square 1 in the testing phase.. so lets identify things that broke.
This commit is contained in:
@@ -29,7 +29,7 @@ using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading;
|
||||
using libsecondlife;
|
||||
using OpenMetaverse;
|
||||
using OpenSim.Framework;
|
||||
using OpenSim.Region.Environment.Interfaces;
|
||||
using OpenSim.Region.ScriptEngine.Interfaces;
|
||||
@@ -192,7 +192,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
/// </summary>
|
||||
/// <param name="localID"></param>
|
||||
/// <param name="itemID"></param>
|
||||
public void RemoveScript(uint localID, LLUUID itemID)
|
||||
public void RemoveScript(uint localID, UUID itemID)
|
||||
{
|
||||
// Remove a specific script
|
||||
|
||||
@@ -219,7 +219,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
|
||||
}
|
||||
|
||||
public Object[] GetSerializationData(LLUUID itemID)
|
||||
public Object[] GetSerializationData(UUID itemID)
|
||||
{
|
||||
List<Object> data = new List<Object>();
|
||||
|
||||
@@ -250,7 +250,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
return data.ToArray();
|
||||
}
|
||||
|
||||
public void CreateFromData(uint localID, LLUUID itemID, LLUUID hostID,
|
||||
public void CreateFromData(uint localID, UUID itemID, UUID hostID,
|
||||
Object[] data)
|
||||
{
|
||||
int idx = 0;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -26,8 +26,7 @@
|
||||
*/
|
||||
using System;
|
||||
using System.Runtime.Remoting.Lifetime;
|
||||
using Axiom.Math;
|
||||
using libsecondlife;
|
||||
using OpenMetaverse;
|
||||
using Nini.Config;
|
||||
using OpenSim.Framework.Console;
|
||||
using OpenSim.Region.Environment.Interfaces;
|
||||
@@ -46,9 +45,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
internal IScriptEngine m_ScriptEngine;
|
||||
internal SceneObjectPart m_host;
|
||||
internal uint m_localID;
|
||||
internal LLUUID m_itemID;
|
||||
internal UUID m_itemID;
|
||||
|
||||
public void Initialize(IScriptEngine ScriptEngine, SceneObjectPart host, uint localID, LLUUID itemID)
|
||||
public void Initialize(IScriptEngine ScriptEngine, SceneObjectPart host, uint localID, UUID itemID)
|
||||
{
|
||||
m_ScriptEngine = ScriptEngine;
|
||||
m_host = host;
|
||||
@@ -86,7 +85,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
if (x > 255 || x < 0 || y > 255 || y < 0)
|
||||
OSSLError("osTerrainSetHeight: Coordinate out of bounds");
|
||||
|
||||
if (World.ExternalChecks.ExternalChecksCanTerraformLand(m_host.OwnerID, new LLVector3(x, y, 0)))
|
||||
if (World.ExternalChecks.ExternalChecksCanTerraformLand(m_host.OwnerID, new Vector3(x, y, 0)))
|
||||
{
|
||||
World.Heightmap[x, y] = val;
|
||||
return 1;
|
||||
@@ -144,7 +143,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
World.SendGeneralAlert(msg);
|
||||
}
|
||||
|
||||
public void osSetRot(LLUUID target, Quaternion rotation)
|
||||
public void osSetRot(UUID target, Quaternion rotation)
|
||||
{
|
||||
if (!m_ScriptEngine.Config.GetBoolean("AllowOSFunctions", false))
|
||||
{
|
||||
@@ -176,7 +175,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
if (dynamicID == String.Empty)
|
||||
{
|
||||
IDynamicTextureManager textureManager = World.RequestModuleInterface<IDynamicTextureManager>();
|
||||
LLUUID createdTexture =
|
||||
UUID createdTexture =
|
||||
textureManager.AddDynamicTextureURL(World.RegionInfo.RegionID, m_host.UUID, contentType, url,
|
||||
extraParams, timer);
|
||||
return createdTexture.ToString();
|
||||
@@ -186,7 +185,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
//TODO update existing dynamic textures
|
||||
}
|
||||
|
||||
return LLUUID.Zero.ToString();
|
||||
return UUID.Zero.ToString();
|
||||
}
|
||||
|
||||
public string osSetDynamicTextureURLBlend(string dynamicID, string contentType, string url, string extraParams,
|
||||
@@ -202,7 +201,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
if (dynamicID == String.Empty)
|
||||
{
|
||||
IDynamicTextureManager textureManager = World.RequestModuleInterface<IDynamicTextureManager>();
|
||||
LLUUID createdTexture =
|
||||
UUID createdTexture =
|
||||
textureManager.AddDynamicTextureURL(World.RegionInfo.RegionID, m_host.UUID, contentType, url,
|
||||
extraParams, timer, true, (byte) alpha);
|
||||
return createdTexture.ToString();
|
||||
@@ -212,7 +211,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
//TODO update existing dynamic textures
|
||||
}
|
||||
|
||||
return LLUUID.Zero.ToString();
|
||||
return UUID.Zero.ToString();
|
||||
}
|
||||
|
||||
public string osSetDynamicTextureData(string dynamicID, string contentType, string data, string extraParams,
|
||||
@@ -230,7 +229,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
IDynamicTextureManager textureManager = World.RequestModuleInterface<IDynamicTextureManager>();
|
||||
if (textureManager != null)
|
||||
{
|
||||
LLUUID createdTexture =
|
||||
UUID createdTexture =
|
||||
textureManager.AddDynamicTextureData(World.RegionInfo.RegionID, m_host.UUID, contentType, data,
|
||||
extraParams, timer);
|
||||
return createdTexture.ToString();
|
||||
@@ -241,7 +240,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
//TODO update existing dynamic textures
|
||||
}
|
||||
|
||||
return LLUUID.Zero.ToString();
|
||||
return UUID.Zero.ToString();
|
||||
}
|
||||
|
||||
public string osSetDynamicTextureDataBlend(string dynamicID, string contentType, string data, string extraParams,
|
||||
@@ -259,7 +258,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
IDynamicTextureManager textureManager = World.RequestModuleInterface<IDynamicTextureManager>();
|
||||
if (textureManager != null)
|
||||
{
|
||||
LLUUID createdTexture =
|
||||
UUID createdTexture =
|
||||
textureManager.AddDynamicTextureData(World.RegionInfo.RegionID, m_host.UUID, contentType, data,
|
||||
extraParams, timer, true, (byte) alpha);
|
||||
return createdTexture.ToString();
|
||||
@@ -270,7 +269,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
//TODO update existing dynamic textures
|
||||
}
|
||||
|
||||
return LLUUID.Zero.ToString();
|
||||
return UUID.Zero.ToString();
|
||||
}
|
||||
|
||||
public bool osConsoleCommand(string command)
|
||||
@@ -539,9 +538,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
}
|
||||
|
||||
m_host.AddScriptLPS(1);
|
||||
LLUUID landowner = World.GetLandOwner(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y);
|
||||
UUID landowner = World.GetLandOwner(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y);
|
||||
|
||||
if (landowner == LLUUID.Zero)
|
||||
if (landowner == UUID.Zero)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using libsecondlife;
|
||||
using OpenMetaverse;
|
||||
using OpenSim.Region.ScriptEngine.Shared;
|
||||
using OpenSim.Region.ScriptEngine.Shared.Api;
|
||||
|
||||
@@ -49,28 +49,28 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
|
||||
private class DataserverRequest
|
||||
{
|
||||
public uint localID;
|
||||
public LLUUID itemID;
|
||||
public UUID itemID;
|
||||
|
||||
public LLUUID ID;
|
||||
public UUID ID;
|
||||
public string handle;
|
||||
|
||||
public DateTime startTime;
|
||||
}
|
||||
|
||||
public LLUUID RegisterRequest(uint localID, LLUUID itemID,
|
||||
public UUID RegisterRequest(uint localID, UUID itemID,
|
||||
string identifier)
|
||||
{
|
||||
lock (DataserverRequests)
|
||||
{
|
||||
if (DataserverRequests.ContainsKey(identifier))
|
||||
return LLUUID.Zero;
|
||||
return UUID.Zero;
|
||||
|
||||
DataserverRequest ds = new DataserverRequest();
|
||||
|
||||
ds.localID = localID;
|
||||
ds.itemID = itemID;
|
||||
|
||||
ds.ID = LLUUID.Random();
|
||||
ds.ID = UUID.Random();
|
||||
ds.handle = identifier;
|
||||
|
||||
ds.startTime = DateTime.Now;
|
||||
@@ -101,7 +101,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
|
||||
new DetectParams[0]));
|
||||
}
|
||||
|
||||
public void RemoveEvents(uint localID, LLUUID itemID)
|
||||
public void RemoveEvents(uint localID, UUID itemID)
|
||||
{
|
||||
lock (DataserverRequests)
|
||||
{
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
*/
|
||||
|
||||
using System;
|
||||
using libsecondlife;
|
||||
using OpenMetaverse;
|
||||
using OpenSim.Region.Environment.Interfaces;
|
||||
using OpenSim.Region.Environment.Modules.Scripting.WorldComm;
|
||||
using OpenSim.Region.ScriptEngine.Shared;
|
||||
@@ -74,14 +74,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
|
||||
}
|
||||
}
|
||||
|
||||
public Object[] GetSerializationData(LLUUID itemID)
|
||||
public Object[] GetSerializationData(UUID itemID)
|
||||
{
|
||||
IWorldComm comms = m_CmdManager.m_ScriptEngine.World.RequestModuleInterface<IWorldComm>();
|
||||
|
||||
return comms.GetSerializationData(itemID);
|
||||
}
|
||||
|
||||
public void CreateFromData(uint localID, LLUUID itemID, LLUUID hostID,
|
||||
public void CreateFromData(uint localID, UUID itemID, UUID hostID,
|
||||
Object[] data)
|
||||
{
|
||||
IWorldComm comms = m_CmdManager.m_ScriptEngine.World.RequestModuleInterface<IWorldComm>();
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using libsecondlife;
|
||||
using OpenMetaverse;
|
||||
using OpenSim.Framework;
|
||||
using OpenSim.Framework.Communications.Cache;
|
||||
using OpenSim.Region.Environment.Scenes;
|
||||
@@ -45,8 +45,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
|
||||
m_CmdManager = CmdManager;
|
||||
}
|
||||
|
||||
public Dictionary<uint, Dictionary<LLUUID, LSL_Types.list>> SenseEvents =
|
||||
new Dictionary<uint, Dictionary<LLUUID, LSL_Types.list>>();
|
||||
public Dictionary<uint, Dictionary<UUID, LSL_Types.list>> SenseEvents =
|
||||
new Dictionary<uint, Dictionary<UUID, LSL_Types.list>>();
|
||||
private Object SenseLock = new Object();
|
||||
|
||||
//
|
||||
@@ -55,12 +55,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
|
||||
private class SenseRepeatClass
|
||||
{
|
||||
public uint localID;
|
||||
public LLUUID itemID;
|
||||
public UUID itemID;
|
||||
public double interval;
|
||||
public DateTime next;
|
||||
|
||||
public string name;
|
||||
public LLUUID keyID;
|
||||
public UUID keyID;
|
||||
public int type;
|
||||
public double range;
|
||||
public double arc;
|
||||
@@ -70,8 +70,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
|
||||
private List<SenseRepeatClass> SenseRepeaters = new List<SenseRepeatClass>();
|
||||
private object SenseRepeatListLock = new object();
|
||||
|
||||
public void SetSenseRepeatEvent(uint m_localID, LLUUID m_itemID,
|
||||
string name, LLUUID keyID, int type, double range,
|
||||
public void SetSenseRepeatEvent(uint m_localID, UUID m_itemID,
|
||||
string name, UUID keyID, int type, double range,
|
||||
double arc, double sec, SceneObjectPart host)
|
||||
{
|
||||
// Always remove first, in case this is a re-set
|
||||
@@ -98,7 +98,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
|
||||
}
|
||||
}
|
||||
|
||||
public void UnSetSenseRepeaterEvents(uint m_localID, LLUUID m_itemID)
|
||||
public void UnSetSenseRepeaterEvents(uint m_localID, UUID m_itemID)
|
||||
{
|
||||
// Remove from timer
|
||||
lock (SenseRepeatListLock)
|
||||
@@ -138,8 +138,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
|
||||
} // lock
|
||||
}
|
||||
|
||||
public void SenseOnce(uint m_localID, LLUUID m_itemID,
|
||||
string name, LLUUID keyID, int type,
|
||||
public void SenseOnce(uint m_localID, UUID m_itemID,
|
||||
string name, UUID keyID, int type,
|
||||
double range, double arc, SceneObjectPart host)
|
||||
{
|
||||
// Add to timer
|
||||
@@ -156,11 +156,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
|
||||
SensorSweep(ts);
|
||||
}
|
||||
|
||||
public LSL_Types.list GetSensorList(uint m_localID, LLUUID m_itemID)
|
||||
public LSL_Types.list GetSensorList(uint m_localID, UUID m_itemID)
|
||||
{
|
||||
lock (SenseLock)
|
||||
{
|
||||
Dictionary<LLUUID, LSL_Types.list> Obj = null;
|
||||
Dictionary<UUID, LSL_Types.list> Obj = null;
|
||||
if (!SenseEvents.TryGetValue(m_localID, out Obj))
|
||||
{
|
||||
return null;
|
||||
@@ -187,11 +187,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
|
||||
return;
|
||||
}
|
||||
|
||||
LLVector3 sensorPos = SensePoint.AbsolutePosition;
|
||||
LLVector3 regionPos = new LLVector3(m_CmdManager.m_ScriptEngine.World.RegionInfo.RegionLocX * Constants.RegionSize, m_CmdManager.m_ScriptEngine.World.RegionInfo.RegionLocY * Constants.RegionSize, 0);
|
||||
LLVector3 fromRegionPos = sensorPos + regionPos;
|
||||
Vector3 sensorPos = SensePoint.AbsolutePosition;
|
||||
Vector3 regionPos = new Vector3(m_CmdManager.m_ScriptEngine.World.RegionInfo.RegionLocX * Constants.RegionSize, m_CmdManager.m_ScriptEngine.World.RegionInfo.RegionLocY * Constants.RegionSize, 0);
|
||||
Vector3 fromRegionPos = sensorPos + regionPos;
|
||||
|
||||
LLQuaternion q = SensePoint.RotationOffset;
|
||||
Quaternion q = SensePoint.RotationOffset;
|
||||
LSL_Types.Quaternion r = new LSL_Types.Quaternion(q.X, q.Y, q.Z, q.W);
|
||||
LSL_Types.Vector3 forward_dir = (new LSL_Types.Vector3(1, 0, 0) * r);
|
||||
double mag_fwd = LSL_Types.Vector3.Mag(forward_dir);
|
||||
@@ -203,7 +203,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
|
||||
|
||||
foreach (EntityBase ent in m_CmdManager.m_ScriptEngine.World.Entities.Values)
|
||||
{
|
||||
LLVector3 toRegionPos = ent.AbsolutePosition + regionPos;
|
||||
Vector3 toRegionPos = ent.AbsolutePosition + regionPos;
|
||||
double dis = Math.Abs((double)Util.GetDistanceTo(toRegionPos, fromRegionPos));
|
||||
if (dis <= ts.range)
|
||||
{
|
||||
@@ -239,7 +239,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
|
||||
double ang_obj = 0;
|
||||
try
|
||||
{
|
||||
LLVector3 diff = toRegionPos - fromRegionPos;
|
||||
Vector3 diff = toRegionPos - fromRegionPos;
|
||||
LSL_Types.Vector3 obj_dir = new LSL_Types.Vector3(diff.X, diff.Y, diff.Z);
|
||||
double dot = LSL_Types.Vector3.Dot(forward_dir, obj_dir);
|
||||
double mag_obj = LSL_Types.Vector3.Mag(obj_dir);
|
||||
@@ -252,7 +252,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
|
||||
if (ang_obj > ts.arc) keep = false;
|
||||
}
|
||||
|
||||
if (keep && (ts.keyID != LLUUID.Zero) && (ts.keyID != ent.UUID))
|
||||
if (keep && (ts.keyID != UUID.Zero) && (ts.keyID != ent.UUID))
|
||||
{
|
||||
keep = false;
|
||||
}
|
||||
@@ -292,10 +292,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
|
||||
// Create object if it doesn't exist
|
||||
if (SenseEvents.ContainsKey(ts.localID) == false)
|
||||
{
|
||||
SenseEvents.Add(ts.localID, new Dictionary<LLUUID, LSL_Types.list>());
|
||||
SenseEvents.Add(ts.localID, new Dictionary<UUID, LSL_Types.list>());
|
||||
}
|
||||
// clear if previous traces exist
|
||||
Dictionary<LLUUID, LSL_Types.list> Obj;
|
||||
Dictionary<UUID, LSL_Types.list> Obj;
|
||||
SenseEvents.TryGetValue(ts.localID, out Obj);
|
||||
if (Obj.ContainsKey(ts.itemID) == true)
|
||||
Obj.Remove(ts.itemID);
|
||||
@@ -320,7 +320,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
|
||||
for (idx = 0; idx < SensedObjects.Length; idx++)
|
||||
{
|
||||
detect[idx] = new DetectParams();
|
||||
detect[idx].Key=(LLUUID)(SensedObjects.Data[idx]);
|
||||
detect[idx].Key=(UUID)(SensedObjects.Data[idx]);
|
||||
detect[idx].Populate(m_CmdManager.m_ScriptEngine.World);
|
||||
}
|
||||
|
||||
@@ -333,7 +333,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
|
||||
}
|
||||
}
|
||||
|
||||
public Object[] GetSerializationData(LLUUID itemID)
|
||||
public Object[] GetSerializationData(UUID itemID)
|
||||
{
|
||||
List<Object> data = new List<Object>();
|
||||
|
||||
@@ -352,7 +352,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
|
||||
return data.ToArray();
|
||||
}
|
||||
|
||||
public void CreateFromData(uint localID, LLUUID itemID, LLUUID objectID,
|
||||
public void CreateFromData(uint localID, UUID itemID, UUID objectID,
|
||||
Object[] data)
|
||||
{
|
||||
SceneObjectPart part =
|
||||
@@ -373,7 +373,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
|
||||
|
||||
ts.interval = (double)data[idx];
|
||||
ts.name = (string)data[idx+1];
|
||||
ts.keyID = (LLUUID)data[idx+2];
|
||||
ts.keyID = (UUID)data[idx+2];
|
||||
ts.type = (int)data[idx+3];
|
||||
ts.range = (double)data[idx+4];
|
||||
ts.arc = (double)data[idx+5];
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using libsecondlife;
|
||||
using OpenMetaverse;
|
||||
using OpenSim.Region.ScriptEngine.Shared.Api;
|
||||
|
||||
namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
|
||||
@@ -48,7 +48,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
|
||||
private class TimerClass
|
||||
{
|
||||
public uint localID;
|
||||
public LLUUID itemID;
|
||||
public UUID itemID;
|
||||
//public double interval;
|
||||
public long interval;
|
||||
//public DateTime next;
|
||||
@@ -58,7 +58,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
|
||||
private List<TimerClass> Timers = new List<TimerClass>();
|
||||
private object TimerListLock = new object();
|
||||
|
||||
public void SetTimerEvent(uint m_localID, LLUUID m_itemID, double sec)
|
||||
public void SetTimerEvent(uint m_localID, UUID m_itemID, double sec)
|
||||
{
|
||||
// Always remove first, in case this is a re-set
|
||||
UnSetTimerEvents(m_localID, m_itemID);
|
||||
@@ -81,7 +81,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
|
||||
}
|
||||
}
|
||||
|
||||
public void UnSetTimerEvents(uint m_localID, LLUUID m_itemID)
|
||||
public void UnSetTimerEvents(uint m_localID, UUID m_itemID)
|
||||
{
|
||||
// Remove from timer
|
||||
lock (TimerListLock)
|
||||
@@ -122,7 +122,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
|
||||
}
|
||||
}
|
||||
|
||||
public Object[] GetSerializationData(LLUUID itemID)
|
||||
public Object[] GetSerializationData(UUID itemID)
|
||||
{
|
||||
List<Object> data = new List<Object>();
|
||||
|
||||
@@ -140,7 +140,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
|
||||
return data.ToArray();
|
||||
}
|
||||
|
||||
public void CreateFromData(uint localID, LLUUID itemID, LLUUID objectID,
|
||||
public void CreateFromData(uint localID, UUID itemID, UUID objectID,
|
||||
Object[] data)
|
||||
{
|
||||
int idx = 0;
|
||||
|
||||
@@ -118,7 +118,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools
|
||||
//System.Console.WriteLine("SCRIPT:" + checkscript);
|
||||
|
||||
// checks for alpha.alpha way of referring to objects in C#
|
||||
// ignores alpha.x alpha.y, alpha.z for refering to vector components
|
||||
// ignores alpha.X alpha.Y, alpha.Z for refering to vector components
|
||||
Match SecurityM;
|
||||
|
||||
// BROKEN: this check is very wrong. It block's any url in strings.
|
||||
|
||||
@@ -31,7 +31,7 @@ using System.Threading;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.Serialization;
|
||||
using libsecondlife;
|
||||
using OpenMetaverse;
|
||||
using OpenSim.Framework;
|
||||
using OpenSim.Region.Environment;
|
||||
using OpenSim.Region.Environment.Scenes;
|
||||
@@ -70,24 +70,24 @@ namespace OpenSim.Region.ScriptEngine.Shared
|
||||
{
|
||||
public DetectParams()
|
||||
{
|
||||
Key = LLUUID.Zero;
|
||||
Key = UUID.Zero;
|
||||
OffsetPos = new LSL_Types.Vector3();
|
||||
LinkNum = 0;
|
||||
Group = LLUUID.Zero;
|
||||
Group = UUID.Zero;
|
||||
Name = String.Empty;
|
||||
Owner = LLUUID.Zero;
|
||||
Owner = UUID.Zero;
|
||||
Position = new LSL_Types.Vector3();
|
||||
Rotation = new LSL_Types.Quaternion();
|
||||
Type = 0;
|
||||
Velocity = new LSL_Types.Vector3();
|
||||
}
|
||||
|
||||
public LLUUID Key;
|
||||
public UUID Key;
|
||||
public LSL_Types.Vector3 OffsetPos;
|
||||
public int LinkNum;
|
||||
public LLUUID Group;
|
||||
public UUID Group;
|
||||
public string Name;
|
||||
public LLUUID Owner;
|
||||
public UUID Owner;
|
||||
public LSL_Types.Vector3 Position;
|
||||
public LSL_Types.Quaternion Rotation;
|
||||
public int Type;
|
||||
@@ -109,17 +109,17 @@ namespace OpenSim.Region.ScriptEngine.Shared
|
||||
presence.AbsolutePosition.Y,
|
||||
presence.AbsolutePosition.Z);
|
||||
Rotation = new LSL_Types.Quaternion(
|
||||
presence.Rotation.x,
|
||||
presence.Rotation.y,
|
||||
presence.Rotation.z,
|
||||
presence.Rotation.w);
|
||||
presence.Rotation.X,
|
||||
presence.Rotation.Y,
|
||||
presence.Rotation.Z,
|
||||
presence.Rotation.W);
|
||||
Velocity = new LSL_Types.Vector3(
|
||||
presence.Velocity.X,
|
||||
presence.Velocity.Y,
|
||||
presence.Velocity.Z);
|
||||
|
||||
Type = 0x01; // Avatar
|
||||
if (presence.Velocity != LLVector3.Zero)
|
||||
if (presence.Velocity != Vector3.Zero)
|
||||
Type |= 0x02; // Active
|
||||
|
||||
Group = presence.ControllingClient.ActiveGroupId;
|
||||
@@ -134,7 +134,7 @@ namespace OpenSim.Region.ScriptEngine.Shared
|
||||
Group = part.GroupID;
|
||||
Name = part.Name;
|
||||
Owner = part.OwnerID;
|
||||
if (part.Velocity == LLVector3.Zero)
|
||||
if (part.Velocity == Vector3.Zero)
|
||||
Type = 0x04; // Passive
|
||||
else
|
||||
Type = 0x02; // Passive
|
||||
@@ -152,7 +152,7 @@ namespace OpenSim.Region.ScriptEngine.Shared
|
||||
part.AbsolutePosition.Y,
|
||||
part.AbsolutePosition.Z);
|
||||
|
||||
LLQuaternion wr = part.GetWorldRotation();
|
||||
Quaternion wr = part.GetWorldRotation();
|
||||
Rotation = new LSL_Types.Quaternion(wr.X, wr.Y, wr.Z, wr.W);
|
||||
|
||||
Velocity = new LSL_Types.Vector3(part.Velocity.X,
|
||||
|
||||
@@ -34,7 +34,7 @@ using System.Security.Policy;
|
||||
using System.Reflection;
|
||||
using System.Globalization;
|
||||
using System.Xml;
|
||||
using libsecondlife;
|
||||
using OpenMetaverse;
|
||||
using log4net;
|
||||
using Nini.Config;
|
||||
using Amib.Threading;
|
||||
@@ -56,12 +56,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
|
||||
private IScriptWorkItem m_CurrentResult=null;
|
||||
private Queue m_EventQueue = new Queue(32);
|
||||
private bool m_RunEvents = false;
|
||||
private LLUUID m_ItemID;
|
||||
private UUID m_ItemID;
|
||||
private uint m_LocalID;
|
||||
private LLUUID m_ObjectID;
|
||||
private LLUUID m_AssetID;
|
||||
private UUID m_ObjectID;
|
||||
private UUID m_AssetID;
|
||||
private IScript m_Script;
|
||||
private LLUUID m_AppDomain;
|
||||
private UUID m_AppDomain;
|
||||
private DetectParams[] m_DetectParams;
|
||||
private bool m_TimerQueued;
|
||||
private DateTime m_EventStart;
|
||||
@@ -98,7 +98,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
|
||||
get { return m_Engine; }
|
||||
}
|
||||
|
||||
public LLUUID AppDomain
|
||||
public UUID AppDomain
|
||||
{
|
||||
get { return m_AppDomain; }
|
||||
set { m_AppDomain = value; }
|
||||
@@ -114,12 +114,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
|
||||
get { return m_ScriptName; }
|
||||
}
|
||||
|
||||
public LLUUID ItemID
|
||||
public UUID ItemID
|
||||
{
|
||||
get { return m_ItemID; }
|
||||
}
|
||||
|
||||
public LLUUID ObjectID
|
||||
public UUID ObjectID
|
||||
{
|
||||
get { return m_ObjectID; }
|
||||
}
|
||||
@@ -129,7 +129,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
|
||||
get { return m_LocalID; }
|
||||
}
|
||||
|
||||
public LLUUID AssetID
|
||||
public UUID AssetID
|
||||
{
|
||||
get { return m_AssetID; }
|
||||
}
|
||||
@@ -152,7 +152,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
|
||||
}
|
||||
|
||||
public ScriptInstance(IScriptEngine engine, uint localID,
|
||||
LLUUID objectID, LLUUID itemID, LLUUID assetID, string assembly,
|
||||
UUID objectID, UUID itemID, UUID assetID, string assembly,
|
||||
AppDomain dom, string primName, string scriptName,
|
||||
int startParam, bool postOnRez, StateSource stateSource,
|
||||
int maxScriptQueue)
|
||||
@@ -520,7 +520,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
|
||||
string text = "Runtime error:\n" + e.InnerException.ToString();
|
||||
if (text.Length > 1000)
|
||||
text = text.Substring(0, 1000);
|
||||
m_Engine.World.SimChat(Helpers.StringToField(text),
|
||||
m_Engine.World.SimChat(Utils.StringToBytes(text),
|
||||
ChatTypeEnum.DebugChannel, 2147483647,
|
||||
part.AbsolutePosition,
|
||||
part.Name, part.UUID, false);
|
||||
@@ -581,7 +581,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
|
||||
Stop(0);
|
||||
SceneObjectPart part=m_Engine.World.GetSceneObjectPart(m_LocalID);
|
||||
part.GetInventoryItem(m_ItemID).PermsMask = 0;
|
||||
part.GetInventoryItem(m_ItemID).PermsGranter = LLUUID.Zero;
|
||||
part.GetInventoryItem(m_ItemID).PermsGranter = UUID.Zero;
|
||||
AsyncCommandManager async = (AsyncCommandManager)m_Engine.AsyncCommands;
|
||||
async.RemoveScript(m_LocalID, m_ItemID);
|
||||
m_EventQueue.Clear();
|
||||
@@ -602,7 +602,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
|
||||
m_Script.ResetVars();
|
||||
SceneObjectPart part=m_Engine.World.GetSceneObjectPart(m_LocalID);
|
||||
part.GetInventoryItem(m_ItemID).PermsMask = 0;
|
||||
part.GetInventoryItem(m_ItemID).PermsGranter = LLUUID.Zero;
|
||||
part.GetInventoryItem(m_ItemID).PermsGranter = UUID.Zero;
|
||||
AsyncCommandManager async = (AsyncCommandManager)m_Engine.AsyncCommands;
|
||||
async.RemoveScript(m_LocalID, m_ItemID);
|
||||
if (m_CurrentEvent != "state_entry")
|
||||
@@ -630,10 +630,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
|
||||
return m_DetectParams[idx];
|
||||
}
|
||||
|
||||
public LLUUID GetDetectID(int idx)
|
||||
public UUID GetDetectID(int idx)
|
||||
{
|
||||
if (idx < 0 || idx >= m_DetectParams.Length)
|
||||
return LLUUID.Zero;
|
||||
return UUID.Zero;
|
||||
|
||||
return m_DetectParams[idx].Key;
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ using System.Security.Policy;
|
||||
using System.Reflection;
|
||||
using System.Globalization;
|
||||
using System.Xml;
|
||||
using libsecondlife;
|
||||
using OpenMetaverse;
|
||||
using log4net;
|
||||
using Nini.Config;
|
||||
using Amib.Threading;
|
||||
@@ -264,9 +264,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
|
||||
new LSL_Types.Vector3(vect);
|
||||
|
||||
int d_linkNum=0;
|
||||
LLUUID d_group = LLUUID.Zero;
|
||||
UUID d_group = UUID.Zero;
|
||||
string d_name = String.Empty;
|
||||
LLUUID d_owner = LLUUID.Zero;
|
||||
UUID d_owner = UUID.Zero;
|
||||
LSL_Types.Vector3 d_position =
|
||||
new LSL_Types.Vector3();
|
||||
LSL_Types.Quaternion d_rotation =
|
||||
@@ -285,14 +285,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
|
||||
|
||||
tmp = det.Attributes.GetNamedItem(
|
||||
"group").Value;
|
||||
LLUUID.TryParse(tmp, out d_group);
|
||||
UUID.TryParse(tmp, out d_group);
|
||||
|
||||
d_name = det.Attributes.GetNamedItem(
|
||||
"name").Value;
|
||||
|
||||
tmp = det.Attributes.GetNamedItem(
|
||||
"owner").Value;
|
||||
LLUUID.TryParse(tmp, out d_owner);
|
||||
UUID.TryParse(tmp, out d_owner);
|
||||
|
||||
tmp = det.Attributes.GetNamedItem(
|
||||
"position").Value;
|
||||
@@ -318,8 +318,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
|
||||
{
|
||||
}
|
||||
|
||||
LLUUID uuid = new LLUUID();
|
||||
LLUUID.TryParse(det.InnerText,
|
||||
UUID uuid = new UUID();
|
||||
UUID.TryParse(det.InnerText,
|
||||
out uuid);
|
||||
|
||||
DetectParams d = new DetectParams();
|
||||
@@ -427,10 +427,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
|
||||
if (itemType == "list")
|
||||
return ReadList(tag);
|
||||
|
||||
if (itemType == "libsecondlife.LLUUID")
|
||||
if (itemType == "libsecondlife.UUID")
|
||||
{
|
||||
LLUUID val = new LLUUID();
|
||||
LLUUID.TryParse(tag.InnerText, out val);
|
||||
UUID val = new UUID();
|
||||
UUID.TryParse(tag.InnerText, out val);
|
||||
|
||||
return val;
|
||||
}
|
||||
|
||||
@@ -123,7 +123,7 @@ namespace OpenSim.Region.ScriptEngine.Shared
|
||||
|
||||
Vector3 vector = (Vector3)o;
|
||||
|
||||
return (x == vector.x && x == vector.x && z == vector.z);
|
||||
return (x == vector.x && y == vector.y && z == vector.z);
|
||||
}
|
||||
|
||||
public static Vector3 operator -(Vector3 vector)
|
||||
|
||||
Reference in New Issue
Block a user