aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ScriptEngine')
-rw-r--r--OpenSim/Region/ScriptEngine/DotNetEngine/EventQueueThreadClass.cs2
-rw-r--r--OpenSim/Region/ScriptEngine/DotNetEngine/ScriptEngine.cs6
-rw-r--r--OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs4
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs8
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs4
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Helpers.cs12
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs8
-rw-r--r--OpenSim/Region/ScriptEngine/XEngine/XEngine.cs8
8 files changed, 25 insertions, 27 deletions
diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/EventQueueThreadClass.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/EventQueueThreadClass.cs
index 569009e..0feb967 100644
--- a/OpenSim/Region/ScriptEngine/DotNetEngine/EventQueueThreadClass.cs
+++ b/OpenSim/Region/ScriptEngine/DotNetEngine/EventQueueThreadClass.cs
@@ -225,7 +225,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine
225 // TODO: Let users in the sim and those entering it and possibly an external watchdog know what has happened 225 // TODO: Let users in the sim and those entering it and possibly an external watchdog know what has happened
226 m_log.ErrorFormat( 226 m_log.ErrorFormat(
227 "[{0}]: Event queue thread terminating with exception. PLEASE REBOOT YOUR SIM - SCRIPT EVENTS WILL NOT WORK UNTIL YOU DO. Exception is {1}", 227 "[{0}]: Event queue thread terminating with exception. PLEASE REBOOT YOUR SIM - SCRIPT EVENTS WILL NOT WORK UNTIL YOU DO. Exception is {1}",
228 ScriptEngineName, e); 228 ScriptEngineName, e);
229 } 229 }
230 } 230 }
231 231
diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptEngine.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptEngine.cs
index 8ad916c..3c91b29 100644
--- a/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptEngine.cs
+++ b/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptEngine.cs
@@ -418,7 +418,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine
418 { 418 {
419 InstanceData id = m_ScriptManager.GetScript(localID, itemID); 419 InstanceData id = m_ScriptManager.GetScript(localID, itemID);
420 if (id == null) 420 if (id == null)
421 return; 421 return;
422 422
423 if (!id.Disabled) 423 if (!id.Disabled)
424 id.Running = true; 424 id.Running = true;
@@ -428,7 +428,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine
428 { 428 {
429 InstanceData id = m_ScriptManager.GetScript(localID, itemID); 429 InstanceData id = m_ScriptManager.GetScript(localID, itemID);
430 if (id == null) 430 if (id == null)
431 return; 431 return;
432 432
433 id.Running = false; 433 id.Running = false;
434 } 434 }
@@ -442,7 +442,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine
442 442
443 InstanceData id = m_ScriptManager.GetScript(localID, itemID); 443 InstanceData id = m_ScriptManager.GetScript(localID, itemID);
444 if (id == null) 444 if (id == null)
445 return; 445 return;
446 446
447 IEventQueue eq = World.RequestModuleInterface<IEventQueue>(); 447 IEventQueue eq = World.RequestModuleInterface<IEventQueue>();
448 if (eq == null) 448 if (eq == null)
diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs
index 9c1cd4d..6ac209e 100644
--- a/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs
+++ b/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs
@@ -520,13 +520,13 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine
520 ExeStage = 5; // ;^) Ewe Loon, for debuging 520 ExeStage = 5; // ;^) Ewe Loon, for debuging
521 } 521 }
522 catch (Exception e) // ;^) Ewe Loon, From here down tis fix 522 catch (Exception e) // ;^) Ewe Loon, From here down tis fix
523 { 523 {
524 if ((ExeStage == 3)&&(qParams.Length>0)) 524 if ((ExeStage == 3)&&(qParams.Length>0))
525 detparms.Remove(id); 525 detparms.Remove(id);
526 SceneObjectPart ob = m_scriptEngine.World.GetSceneObjectPart(localID); 526 SceneObjectPart ob = m_scriptEngine.World.GetSceneObjectPart(localID);
527 m_log.InfoFormat("[Script Error] ,{0},{1},@{2},{3},{4},{5}", ob.Name , FunctionName, ExeStage, e.Message, qParams.Length, detparms.Count); 527 m_log.InfoFormat("[Script Error] ,{0},{1},@{2},{3},{4},{5}", ob.Name , FunctionName, ExeStage, e.Message, qParams.Length, detparms.Count);
528 if (ExeStage != 2) throw e; 528 if (ExeStage != 2) throw e;
529 } 529 }
530 } 530 }
531 531
532 public uint GetLocalID(UUID itemID) 532 public uint GetLocalID(UUID itemID)
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index 0bd6546..bf83a49 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -2007,10 +2007,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2007 q = avatar.Rotation; // Currently infrequently updated so may be inaccurate 2007 q = avatar.Rotation; // Currently infrequently updated so may be inaccurate
2008 } 2008 }
2009 else 2009 else
2010 q = part.ParentGroup.GroupRotation; // Likely never get here but just in case 2010 q = part.ParentGroup.Rotation; // Likely never get here but just in case
2011 } 2011 }
2012 else 2012 else
2013 q = part.ParentGroup.GroupRotation; // just the group rotation 2013 q = part.ParentGroup.Rotation; // just the group rotation
2014 return new LSL_Rotation(q.X, q.Y, q.Z, q.W); 2014 return new LSL_Rotation(q.X, q.Y, q.Z, q.W);
2015 } 2015 }
2016 q = part.GetWorldRotation(); 2016 q = part.GetWorldRotation();
@@ -7181,10 +7181,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7181 else 7181 else
7182 q = avatar.Rotation; // Currently infrequently updated so may be inaccurate 7182 q = avatar.Rotation; // Currently infrequently updated so may be inaccurate
7183 else 7183 else
7184 q = m_host.ParentGroup.GroupRotation; // Likely never get here but just in case 7184 q = m_host.ParentGroup.Rotation; // Likely never get here but just in case
7185 } 7185 }
7186 else 7186 else
7187 q = m_host.ParentGroup.GroupRotation; // just the group rotation 7187 q = m_host.ParentGroup.Rotation; // just the group rotation
7188 return new LSL_Rotation(q.X, q.Y, q.Z, q.W); 7188 return new LSL_Rotation(q.X, q.Y, q.Z, q.W);
7189 } 7189 }
7190 7190
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs
index d0df390..8dcb1f5 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs
@@ -95,7 +95,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
95 return m_OSSL_Functions.osWindActiveModelPluginName(); 95 return m_OSSL_Functions.osWindActiveModelPluginName();
96 } 96 }
97 97
98// Not yet plugged in as available OSSL functions, so commented out 98// Not yet plugged in as available OSSL functions, so commented out
99// void osWindParamSet(string plugin, string param, float value) 99// void osWindParamSet(string plugin, string param, float value)
100// { 100// {
101// m_OSSL_Functions.osWindParamSet(plugin, param, value); 101// m_OSSL_Functions.osWindParamSet(plugin, param, value);
@@ -329,7 +329,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
329 329
330 public string osGetSimulatorVersion() 330 public string osGetSimulatorVersion()
331 { 331 {
332 return m_OSSL_Functions.osGetSimulatorVersion(); 332 return m_OSSL_Functions.osGetSimulatorVersion();
333 } 333 }
334 334
335 public Hashtable osParseJSON(string JSON) 335 public Hashtable osParseJSON(string JSON)
diff --git a/OpenSim/Region/ScriptEngine/Shared/Helpers.cs b/OpenSim/Region/ScriptEngine/Shared/Helpers.cs
index 4855d64..84ccafe 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Helpers.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Helpers.cs
@@ -218,16 +218,14 @@ namespace OpenSim.Region.ScriptEngine.Shared
218 } 218 }
219 } 219 }
220 220
221 Position = new LSL_Types.Vector3(part.AbsolutePosition.X, 221 Vector3 absPos = part.AbsolutePosition;
222 part.AbsolutePosition.Y, 222 Position = new LSL_Types.Vector3(absPos.X, absPos.Y, absPos.Z);
223 part.AbsolutePosition.Z);
224 223
225 Quaternion wr = part.ParentGroup.GroupRotation; 224 Quaternion wr = part.ParentGroup.Rotation;
226 Rotation = new LSL_Types.Quaternion(wr.X, wr.Y, wr.Z, wr.W); 225 Rotation = new LSL_Types.Quaternion(wr.X, wr.Y, wr.Z, wr.W);
227 226
228 Velocity = new LSL_Types.Vector3(part.Velocity.X, 227 Vector3 vel = part.Velocity;
229 part.Velocity.Y, 228 Velocity = new LSL_Types.Vector3(vel.X, vel.Y, vel.Z);
230 part.Velocity.Z);
231 } 229 }
232 } 230 }
233 231
diff --git a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
index 650d9fa..97166cf 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
@@ -261,7 +261,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
261 "SecondLife.Script"); 261 "SecondLife.Script");
262 262
263 //ILease lease = (ILease)RemotingServices.GetLifetimeService(m_Script as ScriptBaseClass); 263 //ILease lease = (ILease)RemotingServices.GetLifetimeService(m_Script as ScriptBaseClass);
264 RemotingServices.GetLifetimeService(m_Script as ScriptBaseClass); 264 RemotingServices.GetLifetimeService(m_Script as ScriptBaseClass);
265// lease.Register(this); 265// lease.Register(this);
266 } 266 }
267 catch (Exception) 267 catch (Exception)
@@ -430,7 +430,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
430 430
431 permsGranter = part.TaskInventory[m_ItemID].PermsGranter; 431 permsGranter = part.TaskInventory[m_ItemID].PermsGranter;
432 permsMask = part.TaskInventory[m_ItemID].PermsMask; 432 permsMask = part.TaskInventory[m_ItemID].PermsMask;
433 } 433 }
434 434
435 if ((permsMask & ScriptBaseClass.PERMISSION_TAKE_CONTROLS) != 0) 435 if ((permsMask & ScriptBaseClass.PERMISSION_TAKE_CONTROLS) != 0)
436 { 436 {
@@ -630,7 +630,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
630 /// <summary> 630 /// <summary>
631 /// Process the next event queued for this script 631 /// Process the next event queued for this script
632 /// </summary> 632 /// </summary>
633 /// <returns></returns> 633 /// <returns></returns>
634 public object EventProcessor() 634 public object EventProcessor()
635 { 635 {
636 lock (m_Script) 636 lock (m_Script)
@@ -925,7 +925,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
925 925
926 public override string ToString() 926 public override string ToString()
927 { 927 {
928 return String.Format("{0} {1} on {2}", m_ScriptName, m_ItemID, m_PrimName); 928 return String.Format("{0} {1} on {2}", m_ScriptName, m_ItemID, m_PrimName);
929 } 929 }
930 930
931 string FormatException(Exception e) 931 string FormatException(Exception e)
diff --git a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
index 9a972c2..e695133 100644
--- a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
+++ b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
@@ -554,7 +554,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
554 554
555 // We must look for the part outside the m_Scripts lock because GetSceneObjectPart later triggers the 555 // We must look for the part outside the m_Scripts lock because GetSceneObjectPart later triggers the
556 // m_parts lock on SOG. At the same time, a scene object that is being deleted will take the m_parts lock 556 // m_parts lock on SOG. At the same time, a scene object that is being deleted will take the m_parts lock
557 // and then later on try to take the m_scripts lock in this class when it calls OnRemoveScript() 557 // and then later on try to take the m_scripts lock in this class when it calls OnRemoveScript()
558 SceneObjectPart part = m_Scene.GetSceneObjectPart(localID); 558 SceneObjectPart part = m_Scene.GetSceneObjectPart(localID);
559 if (part == null) 559 if (part == null)
560 { 560 {
@@ -562,7 +562,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
562 m_ScriptErrorMessage += "SceneObjectPart unavailable. Script NOT started.\n"; 562 m_ScriptErrorMessage += "SceneObjectPart unavailable. Script NOT started.\n";
563 m_ScriptFailCount++; 563 m_ScriptFailCount++;
564 return false; 564 return false;
565 } 565 }
566 566
567 TaskInventoryItem item = part.Inventory.GetInventoryItem(itemID); 567 TaskInventoryItem item = part.Inventory.GetInventoryItem(itemID);
568 if (item == null) 568 if (item == null)
@@ -692,7 +692,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
692 AppDomain.CreateDomain( 692 AppDomain.CreateDomain(
693 m_Scene.RegionInfo.RegionID.ToString(), 693 m_Scene.RegionInfo.RegionID.ToString(),
694 evidence, appSetup); 694 evidence, appSetup);
695/* 695/*
696 PolicyLevel sandboxPolicy = PolicyLevel.CreateAppDomainLevel(); 696 PolicyLevel sandboxPolicy = PolicyLevel.CreateAppDomainLevel();
697 AllMembershipCondition sandboxMembershipCondition = new AllMembershipCondition(); 697 AllMembershipCondition sandboxMembershipCondition = new AllMembershipCondition();
698 PermissionSet sandboxPermissionSet = sandboxPolicy.GetNamedPermissionSet("Internet"); 698 PermissionSet sandboxPermissionSet = sandboxPolicy.GetNamedPermissionSet("Internet");
@@ -925,7 +925,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
925 return new XWorkItem(m_ThreadPool.QueueWorkItem( 925 return new XWorkItem(m_ThreadPool.QueueWorkItem(
926 new WorkItemCallback(this.ProcessEventHandler), 926 new WorkItemCallback(this.ProcessEventHandler),
927 parms)); 927 parms));
928 } 928 }
929 929
930 /// <summary> 930 /// <summary>
931 /// Process a previously posted script event. 931 /// Process a previously posted script event.