aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
diff options
context:
space:
mode:
authorMelanie Thielker2009-04-12 12:03:07 +0000
committerMelanie Thielker2009-04-12 12:03:07 +0000
commit2864c45678a6e2557b6e2fda294d06cc8bfcec10 (patch)
tree24d4ad155281339b3f4a313622ffd25d538d5bdb /OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
parentFix a regression where animations would only be sent if the avatar has (diff)
downloadopensim-SC-2864c45678a6e2557b6e2fda294d06cc8bfcec10.zip
opensim-SC-2864c45678a6e2557b6e2fda294d06cc8bfcec10.tar.gz
opensim-SC-2864c45678a6e2557b6e2fda294d06cc8bfcec10.tar.bz2
opensim-SC-2864c45678a6e2557b6e2fda294d06cc8bfcec10.tar.xz
Actually remove the script if it tries to remove itself.
Fixes Mantis #2929
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs14
1 files changed, 10 insertions, 4 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
index 66691b7..1c865e8 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
@@ -707,11 +707,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
707 } 707 }
708 catch (Exception e) 708 catch (Exception e)
709 { 709 {
710 m_log.DebugFormat("[Script] Exception: {0}", e.Message); 710 // m_log.DebugFormat("[SCRIPT] Exception: {0}", e.Message);
711 m_InEvent = false; 711 m_InEvent = false;
712 m_CurrentEvent = String.Empty; 712 m_CurrentEvent = String.Empty;
713 713
714 if ((!(e is TargetInvocationException) || !(e.InnerException is SelfDeleteException)) && (!(e is ThreadAbortException))) 714 if ((!(e is TargetInvocationException) || (!(e.InnerException is SelfDeleteException) && !(e.InnerException is ScriptDeleteException))) && !(e is ThreadAbortException))
715 { 715 {
716 try 716 try
717 { 717 {
@@ -727,10 +727,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
727 } 727 }
728 catch (Exception e2) // LEGIT: User Scripting 728 catch (Exception e2) // LEGIT: User Scripting
729 { 729 {
730 m_log.Error("[Script]: "+ 730 m_log.Error("[SCRIPT]: "+
731 "Error displaying error in-world: " + 731 "Error displaying error in-world: " +
732 e2.ToString()); 732 e2.ToString());
733 m_log.Error("[Script]: " + 733 m_log.Error("[SCRIPT]: " +
734 "Errormessage: Error compiling script:\r\n" + 734 "Errormessage: Error compiling script:\r\n" +
735 e.ToString()); 735 e.ToString());
736 } 736 }
@@ -741,6 +741,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
741 if (part != null && part.ParentGroup != null) 741 if (part != null && part.ParentGroup != null)
742 m_Engine.World.DeleteSceneObject(part.ParentGroup, false); 742 m_Engine.World.DeleteSceneObject(part.ParentGroup, false);
743 } 743 }
744 else if ((e is TargetInvocationException) && (e.InnerException is ScriptDeleteException))
745 {
746 m_InSelfDelete = true;
747 if (part != null && part.ParentGroup != null)
748 part.Inventory.RemoveInventoryItem(m_ItemID);
749 }
744 } 750 }
745 } 751 }
746 } 752 }