mirror of
https://github.com/opensim/opensim.git
synced 2026-05-19 06:25:44 +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:
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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<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();
|
||||
|
||||
//
|
||||
@@ -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<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, 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<LLUUID, LSL_Types.list> Obj = null;
|
||||
Dictionary<UUID, LSL_Types.list> 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<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);
|
||||
|
||||
@@ -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<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)
|
||||
{
|
||||
// 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)
|
||||
|
||||
Reference in New Issue
Block a user