From 1c3b0da74a6e662ceebad53c82d38ba8a42795b3 Mon Sep 17 00:00:00 2001
From: Melanie
Date: Mon, 16 Jul 2012 23:31:55 +0100
Subject: Revert "Fix script "Running" behavior"
A better solution using the already present flags must be found.
This reverts commit 6d3ee8bb39d47ed7b32e8905fa0b2fc31c5a9f80.
---
OpenSim/Region/ScriptEngine/Interfaces/IScriptInstance.cs | 10 ----------
OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs | 9 ---------
.../Region/ScriptEngine/Shared/Instance/ScriptSerializer.cs | 11 -----------
OpenSim/Region/ScriptEngine/XEngine/XEngine.cs | 7 -------
4 files changed, 37 deletions(-)
(limited to 'OpenSim/Region/ScriptEngine')
diff --git a/OpenSim/Region/ScriptEngine/Interfaces/IScriptInstance.cs b/OpenSim/Region/ScriptEngine/Interfaces/IScriptInstance.cs
index ec13b6c..b04f6b6 100644
--- a/OpenSim/Region/ScriptEngine/Interfaces/IScriptInstance.cs
+++ b/OpenSim/Region/ScriptEngine/Interfaces/IScriptInstance.cs
@@ -64,16 +64,6 @@ namespace OpenSim.Region.ScriptEngine.Interfaces
bool Running { get; set; }
///
- /// Gets or sets a value indicating whether this
- /// is run.
- /// For viewer script editor control
- ///
- ///
- /// true if run; otherwise, false.
- ///
- bool Run { get; set; }
-
- ///
/// Is the script suspended?
///
bool Suspended { get; set; }
diff --git a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
index f1abd4b..d570ef7 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
@@ -121,8 +121,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
public bool Running { get; set; }
- public bool Run { get; set; }
-
public bool Suspended
{
get { return m_Suspended; }
@@ -218,7 +216,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
m_postOnRez = postOnRez;
m_AttachedAvatar = part.ParentGroup.AttachedAvatar;
m_RegionID = part.ParentGroup.Scene.RegionInfo.RegionID;
- Run = true;
if (part != null)
{
@@ -360,9 +357,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
if (m_startedFromSavedState)
{
- if (!Run)
- return;
-
Start();
if (m_postOnRez)
{
@@ -395,9 +389,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
}
else
{
- if (!Run)
- return;
-
Start();
PostEvent(new EventParams("state_entry",
new Object[0], new DetectParams[0]));
diff --git a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptSerializer.cs b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptSerializer.cs
index 797bce3..bcdc7bf 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptSerializer.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptSerializer.cs
@@ -55,7 +55,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
public static string Serialize(ScriptInstance instance)
{
bool running = instance.Running;
- bool enabled = instance.Run;
XmlDocument xmldoc = new XmlDocument();
@@ -78,12 +77,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
rootElement.AppendChild(run);
- XmlElement run_enable = xmldoc.CreateElement("", "Run", "");
- run_enable.AppendChild(xmldoc.CreateTextNode(
- enabled.ToString()));
-
- rootElement.AppendChild(run_enable);
-
Dictionary vars = instance.GetVars();
XmlElement variables = xmldoc.CreateElement("", "Variables", "");
@@ -232,7 +225,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
{
object varValue;
XmlNodeList partL = rootNode.ChildNodes;
- instance.Run = true;
foreach (XmlNode part in partL)
{
@@ -244,9 +236,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
case "Running":
instance.Running=bool.Parse(part.InnerText);
break;
- case "Run":
- instance.Run = bool.Parse(part.InnerText);
- break;
case "Variables":
XmlNodeList varL = part.ChildNodes;
foreach (XmlNode var in varL)
diff --git a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
index 20fad05..01aebb6 100644
--- a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
+++ b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
@@ -1541,13 +1541,6 @@ namespace OpenSim.Region.ScriptEngine.XEngine
}
}
- public void SetRunEnable(UUID instanceID, bool enable)
- {
- IScriptInstance instance = GetInstance(instanceID);
- if (instance != null)
- instance.Run = enable;
- }
-
public bool GetScriptState(UUID itemID)
{
IScriptInstance instance = GetInstance(itemID);
--
cgit v1.1