aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs')
-rw-r--r--OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs18
1 files changed, 10 insertions, 8 deletions
diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs
index 9621e56..29171a1 100644
--- a/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs
+++ b/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs
@@ -249,6 +249,8 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine
249 { 249 {
250 250
251 251
252
253
252 // Create a new instance of the compiler (currently we don't want reuse) 254 // Create a new instance of the compiler (currently we don't want reuse)
253 OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL.Compiler LSLCompiler = new OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL.Compiler(); 255 OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL.Compiler LSLCompiler = new OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL.Compiler();
254 // Compile (We assume LSL) 256 // Compile (We assume LSL)
@@ -272,11 +274,15 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine
272 274
273 // We need to give (untrusted) assembly a private instance of BuiltIns 275 // We need to give (untrusted) assembly a private instance of BuiltIns
274 // this private copy will contain Read-Only FullitemID so that it can bring that on to the server whenever needed. 276 // this private copy will contain Read-Only FullitemID so that it can bring that on to the server whenever needed.
275 LSL_BuiltIn_Commands LSLB = new LSL_BuiltIn_Commands(this, World.GetSceneObjectPart(localID)); 277 LSL_BuiltIn_Commands LSLB = new LSL_BuiltIn_Commands(m_scriptEngine, World.GetSceneObjectPart(localID), localID, itemID);
276 278
277 // Start the script - giving it BuiltIns 279 // Start the script - giving it BuiltIns
278 CompiledScript.Start(LSLB); 280 CompiledScript.Start(LSLB);
279 281
282 // Fire the first start-event
283 m_scriptEngine.myEventQueueManager.AddToObjectQueue(localID, "state_entry", new object[] { });
284
285
280 } 286 }
281 catch (Exception e) 287 catch (Exception e)
282 { 288 {
@@ -291,6 +297,9 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine
291 // Stop script 297 // Stop script
292 Console.WriteLine("Stop script localID: " + localID + " LLUID: " + itemID.ToString()); 298 Console.WriteLine("Stop script localID: " + localID + " LLUID: " + itemID.ToString());
293 299
300 // Stop long command on script
301 m_scriptEngine.myLSLLongCmdHandler.RemoveScript(localID, itemID);
302
294 // Get AppDomain 303 // Get AppDomain
295 AppDomain ad = GetScript(localID, itemID).Exec.GetAppDomain(); 304 AppDomain ad = GetScript(localID, itemID).Exec.GetAppDomain();
296 // Tell script not to accept new requests 305 // Tell script not to accept new requests
@@ -328,12 +337,5 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine
328 337
329 } 338 }
330 339
331 public string RegionName
332 {
333 get
334 {
335 return World.RegionInfo.RegionName;
336 }
337 }
338 } 340 }
339} 341}