aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared
diff options
context:
space:
mode:
authorBlueWall2012-12-12 23:34:20 -0500
committerBlueWall2012-12-12 23:34:20 -0500
commit7a87c35f94a846e9a2b74d2347c2be5ba0511a38 (patch)
treeecb370ecb60a256a0b40787d76932a0d86b78ec4 /OpenSim/Region/ScriptEngine/Shared
parentMove setting to correct locations in ini (diff)
parentMerge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff)
downloadopensim-SC_OLD-7a87c35f94a846e9a2b74d2347c2be5ba0511a38.zip
opensim-SC_OLD-7a87c35f94a846e9a2b74d2347c2be5ba0511a38.tar.gz
opensim-SC_OLD-7a87c35f94a846e9a2b74d2347c2be5ba0511a38.tar.bz2
opensim-SC_OLD-7a87c35f94a846e9a2b74d2347c2be5ba0511a38.tar.xz
Merge branch 'master' of /home/opensim/var/repo/opensim
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs43
1 files changed, 32 insertions, 11 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
index 5ad6eeb..dfe8386 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
@@ -93,6 +93,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
93 private UUID m_CurrentStateHash; 93 private UUID m_CurrentStateHash;
94 private UUID m_RegionID; 94 private UUID m_RegionID;
95 95
96 public int DebugLevel { get; set; }
97
96 public Dictionary<KeyValuePair<int, int>, KeyValuePair<int, int>> LineMap { get; set; } 98 public Dictionary<KeyValuePair<int, int>, KeyValuePair<int, int>> LineMap { get; set; }
97 99
98 private Dictionary<string,IScriptApi> m_Apis = new Dictionary<string,IScriptApi>(); 100 private Dictionary<string,IScriptApi> m_Apis = new Dictionary<string,IScriptApi>();
@@ -548,9 +550,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
548 // forcibly abort the work item (this aborts the underlying thread). 550 // forcibly abort the work item (this aborts the underlying thread).
549 if (!m_InSelfDelete) 551 if (!m_InSelfDelete)
550 { 552 {
551// m_log.ErrorFormat( 553 m_log.DebugFormat(
552// "[SCRIPT INSTANCE]: Aborting script {0} {1} in prim {2} {3} {4} {5}", 554 "[SCRIPT INSTANCE]: Aborting unstopped script {0} {1} in prim {2}, localID {3}, timeout was {4} ms",
553// ScriptName, ItemID, PrimName, ObjectID, m_InSelfDelete, DateTime.Now.Ticks); 555 ScriptName, ItemID, PrimName, LocalID, timeout);
554 556
555 workItem.Abort(); 557 workItem.Abort();
556 } 558 }
@@ -703,21 +705,42 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
703 if (data.EventName == "collision") 705 if (data.EventName == "collision")
704 m_CollisionInQueue = false; 706 m_CollisionInQueue = false;
705 } 707 }
706 708
707// m_log.DebugFormat("[XEngine]: Processing event {0} for {1}", data.EventName, this); 709 SceneObjectPart part = Engine.World.GetSceneObjectPart(LocalID);
710
711 if (DebugLevel >= 2)
712 m_log.DebugFormat(
713 "[SCRIPT INSTANCE]: Processing event {0} for {1}/{2}({3})/{4}({5}) @ {6}/{7}",
714 data.EventName,
715 ScriptName,
716 part.Name,
717 part.LocalId,
718 part.ParentGroup.Name,
719 part.ParentGroup.UUID,
720 part.AbsolutePosition,
721 part.ParentGroup.Scene.Name);
708 722
709 m_DetectParams = data.DetectParams; 723 m_DetectParams = data.DetectParams;
710 724
711 if (data.EventName == "state") // Hardcoded state change 725 if (data.EventName == "state") // Hardcoded state change
712 { 726 {
713 // m_log.DebugFormat("[Script] Script {0}.{1} state set to {2}",
714 // PrimName, ScriptName, data.Params[0].ToString());
715 State = data.Params[0].ToString(); 727 State = data.Params[0].ToString();
728
729 if (DebugLevel >= 1)
730 m_log.DebugFormat(
731 "[SCRIPT INSTANCE]: Changing state to {0} for {1}/{2}({3})/{4}({5}) @ {6}/{7}",
732 State,
733 ScriptName,
734 part.Name,
735 part.LocalId,
736 part.ParentGroup.Name,
737 part.ParentGroup.UUID,
738 part.AbsolutePosition,
739 part.ParentGroup.Scene.Name);
740
716 AsyncCommandManager.RemoveScript(Engine, 741 AsyncCommandManager.RemoveScript(Engine,
717 LocalID, ItemID); 742 LocalID, ItemID);
718 743
719 SceneObjectPart part = Engine.World.GetSceneObjectPart(
720 LocalID);
721 if (part != null) 744 if (part != null)
722 { 745 {
723 part.SetScriptEvents(ItemID, 746 part.SetScriptEvents(ItemID,
@@ -729,8 +752,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
729 if (Engine.World.PipeEventsForScript(LocalID) || 752 if (Engine.World.PipeEventsForScript(LocalID) ||
730 data.EventName == "control") // Don't freeze avies! 753 data.EventName == "control") // Don't freeze avies!
731 { 754 {
732 SceneObjectPart part = Engine.World.GetSceneObjectPart(
733 LocalID);
734 // m_log.DebugFormat("[Script] Delivered event {2} in state {3} to {0}.{1}", 755 // m_log.DebugFormat("[Script] Delivered event {2} in state {3} to {0}.{1}",
735 // PrimName, ScriptName, data.EventName, State); 756 // PrimName, ScriptName, data.EventName, State);
736 757