aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/YEngine/XMRInstMisc.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ScriptEngine/YEngine/XMRInstMisc.cs')
-rw-r--r--OpenSim/Region/ScriptEngine/YEngine/XMRInstMisc.cs34
1 files changed, 33 insertions, 1 deletions
diff --git a/OpenSim/Region/ScriptEngine/YEngine/XMRInstMisc.cs b/OpenSim/Region/ScriptEngine/YEngine/XMRInstMisc.cs
index 12feb7b..e97c71e 100644
--- a/OpenSim/Region/ScriptEngine/YEngine/XMRInstMisc.cs
+++ b/OpenSim/Region/ScriptEngine/YEngine/XMRInstMisc.cs
@@ -236,6 +236,13 @@ namespace OpenSim.Region.ScriptEngine.Yengine
236 return GetScriptFileName(m_ScriptBasePath, filename); 236 return GetScriptFileName(m_ScriptBasePath, filename);
237 } 237 }
238 238
239 public string GetScriptILFileName(string filename)
240 {
241 string path = Path.Combine(m_ScriptBasePath, "DebugIL");
242 Directory.CreateDirectory(path);
243 return Path.Combine(path, filename);
244 }
245
239 public static string GetScriptFileName(string scriptBasePath, string filename) 246 public static string GetScriptFileName(string scriptBasePath, string filename)
240 { 247 {
241 // Get old path, ie, all files lumped in a single huge directory. 248 // Get old path, ie, all files lumped in a single huge directory.
@@ -363,8 +370,33 @@ namespace OpenSim.Region.ScriptEngine.Yengine
363 lock(m_QueueLock) 370 lock(m_QueueLock)
364 { 371 {
365 m_Running = value; 372 m_Running = value;
366 if(!value) 373 if(value)
374 {
375 if (m_IState == XMRInstState.SUSPENDED && m_SuspendCount == 0)
376 {
377 if(eventCode != ScriptEventCode.None)
378 {
379 m_IState = XMRInstState.ONYIELDQ;
380 m_Engine.QueueToYield(this);
381 }
382 else if ((m_EventQueue != null) && (m_EventQueue.First != null))
383 {
384 m_IState = XMRInstState.ONSTARTQ;
385 m_Engine.QueueToStart(this);
386 }
387 else
388 m_IState = XMRInstState.IDLE;
389 }
390 else if(m_SuspendCount != 0)
391 m_IState = XMRInstState.IDLE;
392 }
393 else
367 { 394 {
395 if(m_IState == XMRInstState.ONSLEEPQ)
396 {
397 m_Engine.RemoveFromSleep(this);
398 m_IState = XMRInstState.SUSPENDED;
399 }
368 EmptyEventQueues(); 400 EmptyEventQueues();
369 } 401 }
370 } 402 }