aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
diff options
context:
space:
mode:
authorBlueWall2012-06-23 04:11:31 -0400
committerBlueWall2012-06-23 04:15:14 -0400
commit6d3ee8bb39d47ed7b32e8905fa0b2fc31c5a9f80 (patch)
tree355fc7f7b91c55f7de9a90f2bd12d4fa2cd91e0d /OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
parentResolve various race conditions between accessing and removing external scrip... (diff)
downloadopensim-SC-6d3ee8bb39d47ed7b32e8905fa0b2fc31c5a9f80.zip
opensim-SC-6d3ee8bb39d47ed7b32e8905fa0b2fc31c5a9f80.tar.gz
opensim-SC-6d3ee8bb39d47ed7b32e8905fa0b2fc31c5a9f80.tar.bz2
opensim-SC-6d3ee8bb39d47ed7b32e8905fa0b2fc31c5a9f80.tar.xz
Fix script "Running" behavior
Unchecking "Running" box in script editor now persists. This fixes http://opensimulator.org/mantis/view.php?id=6057
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs9
1 files changed, 9 insertions, 0 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
index 5dfe58e..306090e 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
@@ -120,6 +120,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
120 120
121 public bool Running { get; set; } 121 public bool Running { get; set; }
122 122
123 public bool Run { get; set; }
124
123 public bool Suspended 125 public bool Suspended
124 { 126 {
125 get { return m_Suspended; } 127 get { return m_Suspended; }
@@ -215,6 +217,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
215 m_postOnRez = postOnRez; 217 m_postOnRez = postOnRez;
216 m_AttachedAvatar = part.ParentGroup.AttachedAvatar; 218 m_AttachedAvatar = part.ParentGroup.AttachedAvatar;
217 m_RegionID = part.ParentGroup.Scene.RegionInfo.RegionID; 219 m_RegionID = part.ParentGroup.Scene.RegionInfo.RegionID;
220 Run = true;
218 221
219 if (part != null) 222 if (part != null)
220 { 223 {
@@ -359,6 +362,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
359 362
360 if (m_startedFromSavedState) 363 if (m_startedFromSavedState)
361 { 364 {
365 if (!Run)
366 return;
367
362 Start(); 368 Start();
363 if (m_postOnRez) 369 if (m_postOnRez)
364 { 370 {
@@ -391,6 +397,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
391 } 397 }
392 else 398 else
393 { 399 {
400 if (!Run)
401 return;
402
394 Start(); 403 Start();
395 PostEvent(new EventParams("state_entry", 404 PostEvent(new EventParams("state_entry",
396 new Object[0], new DetectParams[0])); 405 new Object[0], new DetectParams[0]));