Mantis#1498. Thank you Melanie for an XEngine patch that addresses:
The attatched patch makes the changed() event fire properly and lets scripts run properly. NOTE: All existing state files must be deleted: rm ScriptEngines/*/*.state0.6.0-stable
parent
4ea9183b66
commit
de11c09794
|
@ -974,8 +974,11 @@ namespace OpenSim.Region.ScriptEngine.XEngine
|
||||||
// but if there is state, then we fire the change
|
// but if there is state, then we fire the change
|
||||||
// event
|
// event
|
||||||
if(stateSource == StateSource.NewRez)
|
if(stateSource == StateSource.NewRez)
|
||||||
|
{
|
||||||
|
// m_Engine.Log.Debug("[XEngine] Posted changed(CHANGED_REGION_RESTART) to script");
|
||||||
PostEvent(new XEventParams("changed",
|
PostEvent(new XEventParams("changed",
|
||||||
new Object[] {256}, new XDetectParams[0]));
|
new Object[] {new LSL_Types.LSLInteger(256)}, new XDetectParams[0]));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -1323,6 +1326,9 @@ namespace OpenSim.Region.ScriptEngine.XEngine
|
||||||
{
|
{
|
||||||
public static string Serialize(XScriptInstance instance)
|
public static string Serialize(XScriptInstance instance)
|
||||||
{
|
{
|
||||||
|
bool running = instance.Running;
|
||||||
|
|
||||||
|
if(running)
|
||||||
instance.Stop(50);
|
instance.Stop(50);
|
||||||
|
|
||||||
XmlDocument xmldoc = new XmlDocument();
|
XmlDocument xmldoc = new XmlDocument();
|
||||||
|
@ -1340,11 +1346,11 @@ namespace OpenSim.Region.ScriptEngine.XEngine
|
||||||
|
|
||||||
rootElement.AppendChild(state);
|
rootElement.AppendChild(state);
|
||||||
|
|
||||||
XmlElement running = xmldoc.CreateElement("", "Running", "");
|
XmlElement run = xmldoc.CreateElement("", "Running", "");
|
||||||
running.AppendChild(xmldoc.CreateTextNode(
|
run.AppendChild(xmldoc.CreateTextNode(
|
||||||
instance.Running.ToString()));
|
running.ToString()));
|
||||||
|
|
||||||
rootElement.AppendChild(running);
|
rootElement.AppendChild(run);
|
||||||
|
|
||||||
Dictionary<string, Object> vars = instance.GetVars();
|
Dictionary<string, Object> vars = instance.GetVars();
|
||||||
|
|
||||||
|
@ -1449,6 +1455,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
|
||||||
|
|
||||||
rootElement.AppendChild(plugins);
|
rootElement.AppendChild(plugins);
|
||||||
|
|
||||||
|
if(running)
|
||||||
instance.Start();
|
instance.Start();
|
||||||
|
|
||||||
return xmldoc.InnerXml;
|
return xmldoc.InnerXml;
|
||||||
|
|
Loading…
Reference in New Issue