aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins
diff options
context:
space:
mode:
authorTeravus Ovares2008-09-06 07:52:41 +0000
committerTeravus Ovares2008-09-06 07:52:41 +0000
commit7d89e122930be39e84a6d174548fa2d12ac0484a (patch)
treee5aa5752f988a9aba2a969f49e5e208985eda80c /OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins
parent* minor: speculatively try a change to bamboo.build to see if this generates ... (diff)
downloadopensim-SC-7d89e122930be39e84a6d174548fa2d12ac0484a.zip
opensim-SC-7d89e122930be39e84a6d174548fa2d12ac0484a.tar.gz
opensim-SC-7d89e122930be39e84a6d174548fa2d12ac0484a.tar.bz2
opensim-SC-7d89e122930be39e84a6d174548fa2d12ac0484a.tar.xz
* 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.
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins')
-rw-r--r--OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/Dataserver.cs14
-rw-r--r--OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/SensorRepeat.cs42
-rw-r--r--OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/Timer.cs8
3 files changed, 32 insertions, 32 deletions
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 @@
28using System; 28using System;
29using System.Collections; 29using System.Collections;
30using System.Collections.Generic; 30using System.Collections.Generic;
31using libsecondlife; 31using OpenMetaverse;
32 32
33namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugins 33namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugins
34 34
@@ -48,28 +48,28 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugin
48 private class DataserverRequest 48 private class DataserverRequest
49 { 49 {
50 public uint localID; 50 public uint localID;
51 public LLUUID itemID; 51 public UUID itemID;
52 52
53 public LLUUID ID; 53 public UUID ID;
54 public string handle; 54 public string handle;
55 55
56 public DateTime startTime; 56 public DateTime startTime;
57 } 57 }
58 58
59 public LLUUID RegisterRequest(uint localID, LLUUID itemID, 59 public UUID RegisterRequest(uint localID, UUID itemID,
60 string identifier) 60 string identifier)
61 { 61 {
62 lock (DataserverRequests) 62 lock (DataserverRequests)
63 { 63 {
64 if (DataserverRequests.ContainsKey(identifier)) 64 if (DataserverRequests.ContainsKey(identifier))
65 return LLUUID.Zero; 65 return UUID.Zero;
66 66
67 DataserverRequest ds = new DataserverRequest(); 67 DataserverRequest ds = new DataserverRequest();
68 68
69 ds.localID = localID; 69 ds.localID = localID;
70 ds.itemID = itemID; 70 ds.itemID = itemID;
71 71
72 ds.ID = LLUUID.Random(); 72 ds.ID = UUID.Random();
73 ds.handle = identifier; 73 ds.handle = identifier;
74 74
75 ds.startTime = DateTime.Now; 75 ds.startTime = DateTime.Now;
@@ -99,7 +99,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugin
99 new LSL_Types.LSLString(reply)}); 99 new LSL_Types.LSLString(reply)});
100 } 100 }
101 101
102 public void RemoveEvents(uint localID, LLUUID itemID) 102 public void RemoveEvents(uint localID, UUID itemID)
103 { 103 {
104 lock (DataserverRequests) 104 lock (DataserverRequests)
105 { 105 {
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 @@
27//#define SPAM 27//#define SPAM
28using System; 28using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using libsecondlife; 30using OpenMetaverse;
31using OpenSim.Framework; 31using OpenSim.Framework;
32using OpenSim.Region.Environment.Scenes; 32using OpenSim.Region.Environment.Scenes;
33using OpenSim.Framework.Communications.Cache; 33using OpenSim.Framework.Communications.Cache;
@@ -43,8 +43,8 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugin
43 m_CmdManager = CmdManager; 43 m_CmdManager = CmdManager;
44 } 44 }
45 45
46 public Dictionary<uint, Dictionary<LLUUID, LSL_Types.list>> SenseEvents = 46 public Dictionary<uint, Dictionary<UUID, LSL_Types.list>> SenseEvents =
47 new Dictionary<uint, Dictionary<LLUUID, LSL_Types.list>>(); 47 new Dictionary<uint, Dictionary<UUID, LSL_Types.list>>();
48 private Object SenseLock = new Object(); 48 private Object SenseLock = new Object();
49 49
50 // 50 //
@@ -53,12 +53,12 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugin
53 private class SenseRepeatClass 53 private class SenseRepeatClass
54 { 54 {
55 public uint localID; 55 public uint localID;
56 public LLUUID itemID; 56 public UUID itemID;
57 public double interval; 57 public double interval;
58 public DateTime next; 58 public DateTime next;
59 59
60 public string name; 60 public string name;
61 public LLUUID keyID; 61 public UUID keyID;
62 public int type; 62 public int type;
63 public double range; 63 public double range;
64 public double arc; 64 public double arc;
@@ -68,8 +68,8 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugin
68 private List<SenseRepeatClass> SenseRepeaters = new List<SenseRepeatClass>(); 68 private List<SenseRepeatClass> SenseRepeaters = new List<SenseRepeatClass>();
69 private object SenseRepeatListLock = new object(); 69 private object SenseRepeatListLock = new object();
70 70
71 public void SetSenseRepeatEvent(uint m_localID, LLUUID m_itemID, 71 public void SetSenseRepeatEvent(uint m_localID, UUID m_itemID,
72 string name, LLUUID keyID, int type, double range, double arc, double sec, SceneObjectPart host) 72 string name, UUID keyID, int type, double range, double arc, double sec, SceneObjectPart host)
73 { 73 {
74 #if SPAM 74 #if SPAM
75 Console.WriteLine("SetSensorEvent"); 75 Console.WriteLine("SetSensorEvent");
@@ -98,7 +98,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugin
98 } 98 }
99 } 99 }
100 100
101 public void UnSetSenseRepeaterEvents(uint m_localID, LLUUID m_itemID) 101 public void UnSetSenseRepeaterEvents(uint m_localID, UUID m_itemID)
102 { 102 {
103 // Remove from timer 103 // Remove from timer
104 lock (SenseRepeatListLock) 104 lock (SenseRepeatListLock)
@@ -138,8 +138,8 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugin
138 } // lock 138 } // lock
139 } 139 }
140 140
141 public void SenseOnce(uint m_localID, LLUUID m_itemID, 141 public void SenseOnce(uint m_localID, UUID m_itemID,
142 string name, LLUUID keyID, int type, 142 string name, UUID keyID, int type,
143 double range, double arc, SceneObjectPart host) 143 double range, double arc, SceneObjectPart host)
144 { 144 {
145 // Add to timer 145 // Add to timer
@@ -156,11 +156,11 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugin
156 SensorSweep(ts); 156 SensorSweep(ts);
157 } 157 }
158 158
159 public LSL_Types.list GetSensorList(uint m_localID, LLUUID m_itemID) 159 public LSL_Types.list GetSensorList(uint m_localID, UUID m_itemID)
160 { 160 {
161 lock (SenseLock) 161 lock (SenseLock)
162 { 162 {
163 Dictionary<LLUUID, LSL_Types.list> Obj = null; 163 Dictionary<UUID, LSL_Types.list> Obj = null;
164 if (!SenseEvents.TryGetValue(m_localID, out Obj)) 164 if (!SenseEvents.TryGetValue(m_localID, out Obj))
165 { 165 {
166 #if SPAM 166 #if SPAM
@@ -199,11 +199,11 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugin
199 } 199 }
200 //m_ScriptEngine.Log.Info("[AsyncLSL]: Enter SensorSweep Scan"); 200 //m_ScriptEngine.Log.Info("[AsyncLSL]: Enter SensorSweep Scan");
201 201
202 LLVector3 sensorPos = SensePoint.AbsolutePosition; 202 Vector3 sensorPos = SensePoint.AbsolutePosition;
203 LLVector3 regionPos = new LLVector3(m_CmdManager.m_ScriptEngine.World.RegionInfo.RegionLocX * Constants.RegionSize, m_CmdManager.m_ScriptEngine.World.RegionInfo.RegionLocY * Constants.RegionSize, 0); 203 Vector3 regionPos = new Vector3(m_CmdManager.m_ScriptEngine.World.RegionInfo.RegionLocX * Constants.RegionSize, m_CmdManager.m_ScriptEngine.World.RegionInfo.RegionLocY * Constants.RegionSize, 0);
204 LLVector3 fromRegionPos = sensorPos + regionPos; 204 Vector3 fromRegionPos = sensorPos + regionPos;
205 205
206 LLQuaternion q = SensePoint.RotationOffset; 206 Quaternion q = SensePoint.RotationOffset;
207 LSL_Types.Quaternion r = new LSL_Types.Quaternion(q.X, q.Y, q.Z, q.W); 207 LSL_Types.Quaternion r = new LSL_Types.Quaternion(q.X, q.Y, q.Z, q.W);
208 LSL_Types.Vector3 forward_dir = (new LSL_Types.Vector3(1, 0, 0) * r); 208 LSL_Types.Vector3 forward_dir = (new LSL_Types.Vector3(1, 0, 0) * r);
209 double mag_fwd = LSL_Types.Vector3.Mag(forward_dir); 209 double mag_fwd = LSL_Types.Vector3.Mag(forward_dir);
@@ -215,7 +215,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugin
215 215
216 foreach (EntityBase ent in m_CmdManager.m_ScriptEngine.World.Entities.Values) 216 foreach (EntityBase ent in m_CmdManager.m_ScriptEngine.World.Entities.Values)
217 { 217 {
218 LLVector3 toRegionPos = ent.AbsolutePosition + regionPos; 218 Vector3 toRegionPos = ent.AbsolutePosition + regionPos;
219 double dis = Math.Abs((double)Util.GetDistanceTo(toRegionPos, fromRegionPos)); 219 double dis = Math.Abs((double)Util.GetDistanceTo(toRegionPos, fromRegionPos));
220 if (dis <= ts.range) 220 if (dis <= ts.range)
221 { 221 {
@@ -248,7 +248,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugin
248 double ang_obj = 0; 248 double ang_obj = 0;
249 try 249 try
250 { 250 {
251 LLVector3 diff = toRegionPos - fromRegionPos; 251 Vector3 diff = toRegionPos - fromRegionPos;
252 LSL_Types.Vector3 obj_dir = new LSL_Types.Vector3(diff.X, diff.Y, diff.Z); 252 LSL_Types.Vector3 obj_dir = new LSL_Types.Vector3(diff.X, diff.Y, diff.Z);
253 double dot = LSL_Types.Vector3.Dot(forward_dir, obj_dir); 253 double dot = LSL_Types.Vector3.Dot(forward_dir, obj_dir);
254 double mag_obj = LSL_Types.Vector3.Mag(obj_dir); 254 double mag_obj = LSL_Types.Vector3.Mag(obj_dir);
@@ -261,7 +261,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugin
261 if (ang_obj > ts.arc) keep = false; 261 if (ang_obj > ts.arc) keep = false;
262 } 262 }
263 263
264 if (keep && (ts.keyID != LLUUID.Zero) && (ts.keyID != ent.UUID)) 264 if (keep && (ts.keyID != UUID.Zero) && (ts.keyID != ent.UUID))
265 { 265 {
266 keep = false; 266 keep = false;
267 } 267 }
@@ -303,10 +303,10 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugin
303 // Create object if it doesn't exist 303 // Create object if it doesn't exist
304 if (SenseEvents.ContainsKey(ts.localID) == false) 304 if (SenseEvents.ContainsKey(ts.localID) == false)
305 { 305 {
306 SenseEvents.Add(ts.localID, new Dictionary<LLUUID, LSL_Types.list>()); 306 SenseEvents.Add(ts.localID, new Dictionary<UUID, LSL_Types.list>());
307 } 307 }
308 // clear if previous traces exist 308 // clear if previous traces exist
309 Dictionary<LLUUID, LSL_Types.list> Obj; 309 Dictionary<UUID, LSL_Types.list> Obj;
310 SenseEvents.TryGetValue(ts.localID, out Obj); 310 SenseEvents.TryGetValue(ts.localID, out Obj);
311 if (Obj.ContainsKey(ts.itemID) == true) 311 if (Obj.ContainsKey(ts.itemID) == true)
312 Obj.Remove(ts.itemID); 312 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 @@
28using System; 28using System;
29using System.Collections; 29using System.Collections;
30using System.Collections.Generic; 30using System.Collections.Generic;
31using libsecondlife; 31using OpenMetaverse;
32 32
33namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugins 33namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugins
34{ 34{
@@ -47,7 +47,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugin
47 private class TimerClass 47 private class TimerClass
48 { 48 {
49 public uint localID; 49 public uint localID;
50 public LLUUID itemID; 50 public UUID itemID;
51 //public double interval; 51 //public double interval;
52 public long interval; 52 public long interval;
53 //public DateTime next; 53 //public DateTime next;
@@ -57,7 +57,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugin
57 private List<TimerClass> Timers = new List<TimerClass>(); 57 private List<TimerClass> Timers = new List<TimerClass>();
58 private object TimerListLock = new object(); 58 private object TimerListLock = new object();
59 59
60 public void SetTimerEvent(uint m_localID, LLUUID m_itemID, double sec) 60 public void SetTimerEvent(uint m_localID, UUID m_itemID, double sec)
61 { 61 {
62 // Console.WriteLine("SetTimerEvent"); 62 // Console.WriteLine("SetTimerEvent");
63 63
@@ -82,7 +82,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugin
82 } 82 }
83 } 83 }
84 84
85 public void UnSetTimerEvents(uint m_localID, LLUUID m_itemID) 85 public void UnSetTimerEvents(uint m_localID, UUID m_itemID)
86 { 86 {
87 // Remove from timer 87 // Remove from timer
88 lock (TimerListLock) 88 lock (TimerListLock)