diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/EventQueueManager.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/EventQueueManager.cs index 22e22fb21f..dde0a77117 100644 --- a/OpenSim/Region/ScriptEngine/DotNetEngine/EventQueueManager.cs +++ b/OpenSim/Region/ScriptEngine/DotNetEngine/EventQueueManager.cs @@ -33,6 +33,7 @@ using System.Threading; using System.Reflection; using OpenSim.Region.Environment.Scenes.Scripting; using libsecondlife; +using OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL; namespace OpenSim.Region.ScriptEngine.DotNetEngine { @@ -282,7 +283,9 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine return; } - foreach (LLUUID itemID in new System.Collections.ArrayList(myScriptEngine.myScriptManager.GetScriptKeys(localID))) + Dictionary.KeyCollection scriptKeys = myScriptEngine.myScriptManager.GetScriptKeys(localID); + + foreach ( LLUUID itemID in scriptKeys ) { // Add to each script in that object // TODO: Some scripts may not subscribe to this event. Should we NOT add it? Does it matter?