From 7d89e122930be39e84a6d174548fa2d12ac0484a Mon Sep 17 00:00:00 2001
From: Teravus Ovares
Date: Sat, 6 Sep 2008 07:52:41 +0000
Subject: * 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.
---
.../Common/ScriptEngineBase/AsyncCommandManager.cs | 4 +-
.../AsyncCommandPlugins/Dataserver.cs | 14 ++---
.../AsyncCommandPlugins/SensorRepeat.cs | 42 +++++++-------
.../ScriptEngineBase/AsyncCommandPlugins/Timer.cs | 8 +--
.../Common/ScriptEngineBase/EventManager.cs | 64 +++++++++++-----------
.../Common/ScriptEngineBase/EventQueueManager.cs | 10 ++--
.../ScriptEngineBase/EventQueueThreadClass.cs | 4 +-
.../Common/ScriptEngineBase/ScriptManager.cs | 48 ++++++++--------
8 files changed, 97 insertions(+), 97 deletions(-)
(limited to 'OpenSim/Region/ScriptEngine/Common/ScriptEngineBase')
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandManager.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandManager.cs
index 64f6970..ee86500 100644
--- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandManager.cs
+++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandManager.cs
@@ -27,7 +27,7 @@
using System.Collections;
using System.Threading;
-using libsecondlife;
+using OpenMetaverse;
using OpenSim.Framework;
using OpenSim.Region.Environment.Interfaces;
using OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugins;
@@ -153,7 +153,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
///
///
///
- public void RemoveScript(uint localID, LLUUID itemID)
+ public void RemoveScript(uint localID, UUID itemID)
{
// Remove a specific script
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/Dataserver.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/Dataserver.cs
index 77cc7ea..378610a 100644
--- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/Dataserver.cs
+++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/Dataserver.cs
@@ -28,7 +28,7 @@
using System;
using System.Collections;
using System.Collections.Generic;
-using libsecondlife;
+using OpenMetaverse;
namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugins
@@ -48,28 +48,28 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugin
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;
@@ -99,7 +99,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugin
new LSL_Types.LSLString(reply)});
}
- public void RemoveEvents(uint localID, LLUUID itemID)
+ public void RemoveEvents(uint localID, UUID itemID)
{
lock (DataserverRequests)
{
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/SensorRepeat.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/SensorRepeat.cs
index 9b636fd..0fce1f2 100644
--- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/SensorRepeat.cs
+++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/SensorRepeat.cs
@@ -27,7 +27,7 @@
//#define SPAM
using System;
using System.Collections.Generic;
-using libsecondlife;
+using OpenMetaverse;
using OpenSim.Framework;
using OpenSim.Region.Environment.Scenes;
using OpenSim.Framework.Communications.Cache;
@@ -43,8 +43,8 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugin
m_CmdManager = CmdManager;
}
- public Dictionary> SenseEvents =
- new Dictionary>();
+ public Dictionary> SenseEvents =
+ new Dictionary>();
private Object SenseLock = new Object();
//
@@ -53,12 +53,12 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugin
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;
@@ -68,8 +68,8 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugin
private List SenseRepeaters = new List();
private object SenseRepeatListLock = new object();
- public void SetSenseRepeatEvent(uint m_localID, LLUUID m_itemID,
- string name, LLUUID keyID, int type, double range, double arc, double sec, SceneObjectPart host)
+ public void SetSenseRepeatEvent(uint m_localID, UUID m_itemID,
+ string name, UUID keyID, int type, double range, double arc, double sec, SceneObjectPart host)
{
#if SPAM
Console.WriteLine("SetSensorEvent");
@@ -98,7 +98,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugin
}
}
- 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.Common.ScriptEngineBase.AsyncCommandPlugin
} // 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.Common.ScriptEngineBase.AsyncCommandPlugin
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 Obj = null;
+ Dictionary Obj = null;
if (!SenseEvents.TryGetValue(m_localID, out Obj))
{
#if SPAM
@@ -199,11 +199,11 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugin
}
//m_ScriptEngine.Log.Info("[AsyncLSL]: Enter SensorSweep Scan");
- 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);
@@ -215,7 +215,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugin
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)
{
@@ -248,7 +248,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugin
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);
@@ -261,7 +261,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugin
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;
}
@@ -303,10 +303,10 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugin
// Create object if it doesn't exist
if (SenseEvents.ContainsKey(ts.localID) == false)
{
- SenseEvents.Add(ts.localID, new Dictionary());
+ SenseEvents.Add(ts.localID, new Dictionary());
}
// clear if previous traces exist
- Dictionary Obj;
+ Dictionary Obj;
SenseEvents.TryGetValue(ts.localID, out Obj);
if (Obj.ContainsKey(ts.itemID) == true)
Obj.Remove(ts.itemID);
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/Timer.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/Timer.cs
index 09af34a..7940b36 100644
--- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/Timer.cs
+++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/Timer.cs
@@ -28,7 +28,7 @@
using System;
using System.Collections;
using System.Collections.Generic;
-using libsecondlife;
+using OpenMetaverse;
namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugins
{
@@ -47,7 +47,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugin
private class TimerClass
{
public uint localID;
- public LLUUID itemID;
+ public UUID itemID;
//public double interval;
public long interval;
//public DateTime next;
@@ -57,7 +57,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugin
private List Timers = new List();
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)
{
// Console.WriteLine("SetTimerEvent");
@@ -82,7 +82,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugin
}
}
- public void UnSetTimerEvents(uint m_localID, LLUUID m_itemID)
+ public void UnSetTimerEvents(uint m_localID, UUID m_itemID)
{
// Remove from timer
lock (TimerListLock)
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventManager.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventManager.cs
index 3fdfd8a..89d7045 100644
--- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventManager.cs
+++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventManager.cs
@@ -27,7 +27,7 @@
using System;
using System.Collections.Generic;
-using libsecondlife;
+using OpenMetaverse;
using OpenSim.Framework;
using OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney;
using OpenSim.Region.Environment;
@@ -96,7 +96,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
{
}
- private void HandleObjectPaid(LLUUID objectID, LLUUID agentID, int amount)
+ private void HandleObjectPaid(UUID objectID, UUID agentID, int amount)
{
SceneObjectPart part=myScriptEngine.World.GetSceneObjectPart(objectID);
if (part != null)
@@ -117,7 +117,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
myScriptEngine.m_EventQueueManager.AddToObjectQueue(localID, "state_entry", EventQueueManager.llDetectNull, new object[] { });
}
- public void touch_start(uint localID, uint originalID, LLVector3 offsetPos, IClientAPI remoteClient)
+ public void touch_start(uint localID, uint originalID, Vector3 offsetPos, IClientAPI remoteClient)
{
// Add to queue for all scripts in ObjectID object
EventQueueManager.Queue_llDetectParams_Struct detstruct = new EventQueueManager.Queue_llDetectParams_Struct();
@@ -135,7 +135,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
detstruct._key2[0] = new LSL_Types.key(remoteClient.AgentId.ToString());
detstruct._string[0] = remoteClient.Name;
detstruct._int[0] = 0;
- detstruct._Quaternion[0] = new LSL_Types.Quaternion(av.Rotation.x,av.Rotation.y,av.Rotation.z,av.Rotation.w);
+ detstruct._Quaternion[0] = new LSL_Types.Quaternion(av.Rotation.X,av.Rotation.Y,av.Rotation.Z,av.Rotation.W);
detstruct._Vector3[0] = new LSL_Types.Vector3(av.AbsolutePosition.X,av.AbsolutePosition.Y,av.AbsolutePosition.Z);
detstruct._Vector32[0] = new LSL_Types.Vector3(av.Velocity.X,av.Velocity.Y,av.Velocity.Z);
}
@@ -170,7 +170,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
detstruct._key2[0] = new LSL_Types.key(remoteClient.AgentId.ToString());
detstruct._string[0] = remoteClient.Name;
detstruct._int[0] = 0;
- detstruct._Quaternion[0] = new LSL_Types.Quaternion(av.Rotation.x, av.Rotation.y, av.Rotation.z, av.Rotation.w);
+ detstruct._Quaternion[0] = new LSL_Types.Quaternion(av.Rotation.X, av.Rotation.Y, av.Rotation.Z, av.Rotation.W);
detstruct._Vector3[0] = new LSL_Types.Vector3(av.AbsolutePosition.X, av.AbsolutePosition.Y, av.AbsolutePosition.Z);
detstruct._Vector32[0] = new LSL_Types.Vector3(av.Velocity.X, av.Velocity.Y, av.Velocity.Z);
}
@@ -187,14 +187,14 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
myScriptEngine.m_EventQueueManager.AddToObjectQueue(localID, "touch_end", detstruct, new object[] { new LSL_Types.LSLInteger(1) });
}
- public void OnRezScript(uint localID, LLUUID itemID, string script, int startParam, bool postOnRez)
+ public void OnRezScript(uint localID, UUID itemID, string script, int startParam, bool postOnRez)
{
myScriptEngine.Log.Debug("OnRezScript localID: " + localID + " LLUID: " + itemID.ToString() + " Size: " +
script.Length);
myScriptEngine.m_ScriptManager.StartScript(localID, itemID, script, startParam, postOnRez);
}
- public void OnRemoveScript(uint localID, LLUUID itemID)
+ public void OnRemoveScript(uint localID, UUID itemID)
{
myScriptEngine.Log.Debug("OnRemoveScript localID: " + localID + " LLUID: " + itemID.ToString());
myScriptEngine.m_ScriptManager.StopScript(
@@ -203,7 +203,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
);
}
- public void money(uint localID, LLUUID agentID, int amount)
+ public void money(uint localID, UUID agentID, int amount)
{
myScriptEngine.m_EventQueueManager.AddToObjectQueue(localID, "money", EventQueueManager.llDetectNull, new object[] { new LSL_Types.LSLString(agentID.ToString()), new LSL_Types.LSLInteger(amount) });
}
@@ -220,12 +220,12 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
myScriptEngine.m_EventQueueManager.AddToObjectQueue(localID, "state_exit", EventQueueManager.llDetectNull, new object[] { });
}
- public void touch(uint localID, uint originalID, LLUUID itemID)
+ public void touch(uint localID, uint originalID, UUID itemID)
{
myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "touch", EventQueueManager.llDetectNull);
}
- public void touch_end(uint localID, uint originalID, LLUUID itemID)
+ public void touch_end(uint localID, uint originalID, UUID itemID)
{
myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "touch_end", EventQueueManager.llDetectNull, new object[] { new LSL_Types.LSLInteger(1) });
}
@@ -314,7 +314,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
myScriptEngine.m_EventQueueManager.AddToObjectQueue(localID, "collision_end", EventQueueManager.llDetectNull, new object[] { new LSL_Types.LSLInteger(col.Colliders.Count) });
}
- public void land_collision_start(uint localID, LLUUID itemID)
+ public void land_collision_start(uint localID, UUID itemID)
{
myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "land_collision_start", EventQueueManager.llDetectNull);
}
@@ -324,48 +324,48 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
myScriptEngine.m_EventQueueManager.AddToObjectQueue(localID, "land_collision", EventQueueManager.llDetectNull);
}
- public void land_collision_end(uint localID, LLUUID itemID)
+ public void land_collision_end(uint localID, UUID itemID)
{
myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "land_collision_end", EventQueueManager.llDetectNull);
}
// Handled by long commands
- public void timer(uint localID, LLUUID itemID)
+ public void timer(uint localID, UUID itemID)
{
//myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, String.Empty);
}
- public void listen(uint localID, LLUUID itemID)
+ public void listen(uint localID, UUID itemID)
{
myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "listen", EventQueueManager.llDetectNull);
}
- public void on_rez(uint localID, LLUUID itemID)
+ public void on_rez(uint localID, UUID itemID)
{
myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "on_rez", EventQueueManager.llDetectNull);
}
- public void sensor(uint localID, LLUUID itemID)
+ public void sensor(uint localID, UUID itemID)
{
myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "sensor", EventQueueManager.llDetectNull);
}
- public void no_sensor(uint localID, LLUUID itemID)
+ public void no_sensor(uint localID, UUID itemID)
{
myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "no_sensor", EventQueueManager.llDetectNull);
}
- public void control(uint localID, LLUUID itemID, LLUUID agentID, uint held, uint change)
+ public void control(uint localID, UUID itemID, UUID agentID, uint held, uint change)
{
myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "control", EventQueueManager.llDetectNull, new object[] { new LSL_Types.LSLString(agentID.ToString()), new LSL_Types.LSLInteger(held), new LSL_Types.LSLInteger(change)});
}
- public void email(uint localID, LLUUID itemID)
+ public void email(uint localID, UUID itemID)
{
myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "email", EventQueueManager.llDetectNull);
}
- public void at_target(uint localID, uint handle, LLVector3 targetpos, LLVector3 atpos)
+ public void at_target(uint localID, uint handle, Vector3 targetpos, Vector3 atpos)
{
myScriptEngine.m_EventQueueManager.AddToObjectQueue(localID, "at_target", EventQueueManager.llDetectNull, new object[] { new LSL_Types.LSLInteger(handle), new LSL_Types.Vector3(targetpos.X,targetpos.Y,targetpos.Z), new LSL_Types.Vector3(atpos.X,atpos.Y,atpos.Z) });
}
@@ -375,63 +375,63 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
myScriptEngine.m_EventQueueManager.AddToObjectQueue(localID, "not_at_target", EventQueueManager.llDetectNull);
}
- public void at_rot_target(uint localID, LLUUID itemID)
+ public void at_rot_target(uint localID, UUID itemID)
{
myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "at_rot_target", EventQueueManager.llDetectNull);
}
- public void not_at_rot_target(uint localID, LLUUID itemID)
+ public void not_at_rot_target(uint localID, UUID itemID)
{
myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "not_at_rot_target", EventQueueManager.llDetectNull);
}
- public void run_time_permissions(uint localID, LLUUID itemID)
+ public void run_time_permissions(uint localID, UUID itemID)
{
myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "run_time_permissions", EventQueueManager.llDetectNull);
}
- public void changed(uint localID, LLUUID itemID)
+ public void changed(uint localID, UUID itemID)
{
myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "changed", EventQueueManager.llDetectNull);
}
- public void attach(uint localID, LLUUID itemID)
+ public void attach(uint localID, UUID itemID)
{
myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "attach", EventQueueManager.llDetectNull);
}
- public void dataserver(uint localID, LLUUID itemID)
+ public void dataserver(uint localID, UUID itemID)
{
myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "dataserver", EventQueueManager.llDetectNull);
}
- public void link_message(uint localID, LLUUID itemID)
+ public void link_message(uint localID, UUID itemID)
{
myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "link_message", EventQueueManager.llDetectNull);
}
- public void moving_start(uint localID, LLUUID itemID)
+ public void moving_start(uint localID, UUID itemID)
{
myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "moving_start", EventQueueManager.llDetectNull);
}
- public void moving_end(uint localID, LLUUID itemID)
+ public void moving_end(uint localID, UUID itemID)
{
myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "moving_end", EventQueueManager.llDetectNull);
}
- public void object_rez(uint localID, LLUUID itemID)
+ public void object_rez(uint localID, UUID itemID)
{
myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "object_rez", EventQueueManager.llDetectNull);
}
- public void remote_data(uint localID, LLUUID itemID)
+ public void remote_data(uint localID, UUID itemID)
{
myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "remote_data", EventQueueManager.llDetectNull);
}
// Handled by long commands
- public void http_response(uint localID, LLUUID itemID)
+ public void http_response(uint localID, UUID itemID)
{
// myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "http_response", EventQueueManager.llDetectNull);
}
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueManager.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueManager.cs
index 5c57874..1a08795 100644
--- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueManager.cs
+++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueManager.cs
@@ -28,7 +28,7 @@
using System;
using System.Collections;
using System.Collections.Generic;
-using libsecondlife;
+using OpenMetaverse;
namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
{
@@ -134,7 +134,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
public struct QueueItemStruct
{
public uint localID;
- public LLUUID itemID;
+ public UUID itemID;
public string functionName;
public Queue_llDetectParams_Struct llDetectParams;
public object[] param;
@@ -308,10 +308,10 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
return;
}
- Dictionary.KeyCollection scriptKeys =
+ Dictionary.KeyCollection scriptKeys =
m_ScriptEngine.m_ScriptManager.GetScriptKeys(localID);
- foreach (LLUUID itemID in scriptKeys)
+ foreach (UUID itemID in scriptKeys)
{
// Add to each script in that object
// TODO: Some scripts may not subscribe to this event. Should we NOT add it? Does it matter?
@@ -326,7 +326,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
/// Region script ID
/// Name of the function, will be state + "_event_" + FunctionName
/// Array of parameters to match event mask
- public void AddToScriptQueue(uint localID, LLUUID itemID, string FunctionName, Queue_llDetectParams_Struct qParams, params object[] param)
+ public void AddToScriptQueue(uint localID, UUID itemID, string FunctionName, Queue_llDetectParams_Struct qParams, params object[] param)
{
lock (eventQueue)
{
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueThreadClass.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueThreadClass.cs
index 4376e00..1e71ae5 100644
--- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueThreadClass.cs
+++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueThreadClass.cs
@@ -31,7 +31,7 @@ using System.Reflection;
using System.Text.RegularExpressions;
using System.Threading;
using System.Globalization;
-using libsecondlife;
+using OpenMetaverse;
using log4net;
using OpenSim.Framework;
using OpenSim.Region.Environment.Scenes.Scripting;
@@ -327,7 +327,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
m_ScriptEngine.World.GetSceneObjectPart(QIS.localID);
//if (m_host != null)
//{
- m_ScriptEngine.World.SimChat(Helpers.StringToField(text),
+ m_ScriptEngine.World.SimChat(Utils.StringToBytes(text),
ChatTypeEnum.DebugChannel, 2147483647,
m_host.AbsolutePosition,
m_host.Name, m_host.UUID, false);
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptManager.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptManager.cs
index 99bbdee..60333b1 100644
--- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptManager.cs
+++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptManager.cs
@@ -31,7 +31,7 @@ using System.IO;
using System.Reflection;
using System.Runtime.Serialization.Formatters.Binary;
using System.Threading;
-using libsecondlife;
+using OpenMetaverse;
using OpenSim.Region.Environment.Scenes;
namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
@@ -69,7 +69,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
private struct LUStruct
{
public uint localID;
- public LLUUID itemID;
+ public UUID itemID;
public string script;
public LUType Action;
public int startParam;
@@ -84,13 +84,13 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
}
// Xantor 20080525: Keep a list of compiled scripts this session for reuse
- public Dictionary scriptList = new Dictionary();
+ public Dictionary scriptList = new Dictionary();
// Object>
// IMPORTANT: Types and MemberInfo-derived objects require a LOT of memory.
// Instead use RuntimeTypeHandle, RuntimeFieldHandle and RunTimeHandle (IntPtr) instead!
- public Dictionary> Scripts =
- new Dictionary>();
+ public Dictionary> Scripts =
+ new Dictionary>();
public Scene World
@@ -254,7 +254,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
///
///
///
- public void StartScript(uint localID, LLUUID itemID, string Script, int startParam, bool postOnRez)
+ public void StartScript(uint localID, UUID itemID, string Script, int startParam, bool postOnRez)
{
lock (LUQueue)
{
@@ -280,7 +280,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
///
///
///
- public void StopScript(uint localID, LLUUID itemID)
+ public void StopScript(uint localID, UUID itemID)
{
LUStruct ls = new LUStruct();
ls.localID = localID;
@@ -297,8 +297,8 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
// Create a new instance of the compiler (reuse)
//private Compiler.LSL.Compiler LSLCompiler = new Compiler.LSL.Compiler();
- public abstract void _StartScript(uint localID, LLUUID itemID, string Script, int startParam, bool postOnRez);
- public abstract void _StopScript(uint localID, LLUUID itemID);
+ public abstract void _StartScript(uint localID, UUID itemID, string Script, int startParam, bool postOnRez);
+ public abstract void _StopScript(uint localID, UUID itemID);
#endregion
@@ -312,7 +312,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
/// Script ID
/// Name of function
/// Arguments to pass to function
- internal void ExecuteEvent(uint localID, LLUUID itemID, string FunctionName, EventQueueManager.Queue_llDetectParams_Struct qParams, object[] args)
+ internal void ExecuteEvent(uint localID, UUID itemID, string FunctionName, EventQueueManager.Queue_llDetectParams_Struct qParams, object[] args)
{
//cfk 2-7-08 dont need this right now and the default Linux build has DEBUG defined
///#if DEBUG
@@ -335,7 +335,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
Script.Exec.ExecuteEvent(FunctionName, args);
}
- public int GetStateEventFlags(uint localID, LLUUID itemID)
+ public int GetStateEventFlags(uint localID, UUID itemID)
{
// Console.WriteLine("GetStateEventFlags for <" + localID + "," + itemID + ">");
try
@@ -360,25 +360,25 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
#region Internal functions to keep track of script
- public Dictionary.KeyCollection GetScriptKeys(uint localID)
+ public Dictionary.KeyCollection GetScriptKeys(uint localID)
{
if (Scripts.ContainsKey(localID) == false)
return null;
- Dictionary Obj;
+ Dictionary Obj;
Scripts.TryGetValue(localID, out Obj);
return Obj.Keys;
}
- public IScript GetScript(uint localID, LLUUID itemID)
+ public IScript GetScript(uint localID, UUID itemID)
{
lock (scriptLock)
{
if (Scripts.ContainsKey(localID) == false)
return null;
- Dictionary Obj;
+ Dictionary Obj;
Scripts.TryGetValue(localID, out Obj);
if (Obj.ContainsKey(itemID) == false)
return null;
@@ -390,18 +390,18 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
}
}
- public void SetScript(uint localID, LLUUID itemID, IScript Script)
+ public void SetScript(uint localID, UUID itemID, IScript Script)
{
lock (scriptLock)
{
// Create object if it doesn't exist
if (Scripts.ContainsKey(localID) == false)
{
- Scripts.Add(localID, new Dictionary());
+ Scripts.Add(localID, new Dictionary());
}
// Delete script if it exists
- Dictionary Obj;
+ Dictionary Obj;
Scripts.TryGetValue(localID, out Obj);
if (Obj.ContainsKey(itemID) == true)
Obj.Remove(itemID);
@@ -411,14 +411,14 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
}
}
- public void RemoveScript(uint localID, LLUUID itemID)
+ public void RemoveScript(uint localID, UUID itemID)
{
// Don't have that object?
if (Scripts.ContainsKey(localID) == false)
return;
// Delete script if it exists
- Dictionary Obj;
+ Dictionary Obj;
Scripts.TryGetValue(localID, out Obj);
if (Obj.ContainsKey(itemID) == true)
Obj.Remove(itemID);
@@ -427,21 +427,21 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
#endregion
- public void ResetScript(uint localID, LLUUID itemID)
+ public void ResetScript(uint localID, UUID itemID)
{
IScript s = GetScript(localID, itemID);
string script = s.Source;
StopScript(localID, itemID);
SceneObjectPart part = World.GetSceneObjectPart(localID);
part.GetInventoryItem(itemID).PermsMask = 0;
- part.GetInventoryItem(itemID).PermsGranter = LLUUID.Zero;
+ part.GetInventoryItem(itemID).PermsGranter = UUID.Zero;
StartScript(localID, itemID, script, s.StartParam, false);
}
#region Script serialization/deserialization
- public void GetSerializedScript(uint localID, LLUUID itemID)
+ public void GetSerializedScript(uint localID, UUID itemID)
{
// Serialize the script and return it
// Should not be a problem
@@ -451,7 +451,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
fs.Close();
}
- public void PutSerializedScript(uint localID, LLUUID itemID)
+ public void PutSerializedScript(uint localID, UUID itemID)
{
// Deserialize the script and inject it into an AppDomain
--
cgit v1.1