aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/ScriptEngine/XEngine/XEngine.cs23
1 files changed, 15 insertions, 8 deletions
diff --git a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
index ae13516..a5da317 100644
--- a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
+++ b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
@@ -974,8 +974,11 @@ namespace OpenSim.Region.ScriptEngine.XEngine
974 // but if there is state, then we fire the change 974 // but if there is state, then we fire the change
975 // event 975 // event
976 if(stateSource == StateSource.NewRez) 976 if(stateSource == StateSource.NewRez)
977 PostEvent(new XEventParams("changed", 977 {
978 new Object[] {256}, new XDetectParams[0])); 978// m_Engine.Log.Debug("[XEngine] Posted changed(CHANGED_REGION_RESTART) to script");
979 PostEvent(new XEventParams("changed",
980 new Object[] {new LSL_Types.LSLInteger(256)}, new XDetectParams[0]));
981 }
979 } 982 }
980 } 983 }
981 else 984 else
@@ -1323,7 +1326,10 @@ namespace OpenSim.Region.ScriptEngine.XEngine
1323 { 1326 {
1324 public static string Serialize(XScriptInstance instance) 1327 public static string Serialize(XScriptInstance instance)
1325 { 1328 {
1326 instance.Stop(50); 1329 bool running = instance.Running;
1330
1331 if(running)
1332 instance.Stop(50);
1327 1333
1328 XmlDocument xmldoc = new XmlDocument(); 1334 XmlDocument xmldoc = new XmlDocument();
1329 1335
@@ -1340,11 +1346,11 @@ namespace OpenSim.Region.ScriptEngine.XEngine
1340 1346
1341 rootElement.AppendChild(state); 1347 rootElement.AppendChild(state);
1342 1348
1343 XmlElement running = xmldoc.CreateElement("", "Running", ""); 1349 XmlElement run = xmldoc.CreateElement("", "Running", "");
1344 running.AppendChild(xmldoc.CreateTextNode( 1350 run.AppendChild(xmldoc.CreateTextNode(
1345 instance.Running.ToString())); 1351 running.ToString()));
1346 1352
1347 rootElement.AppendChild(running); 1353 rootElement.AppendChild(run);
1348 1354
1349 Dictionary<string, Object> vars = instance.GetVars(); 1355 Dictionary<string, Object> vars = instance.GetVars();
1350 1356
@@ -1449,7 +1455,8 @@ namespace OpenSim.Region.ScriptEngine.XEngine
1449 1455
1450 rootElement.AppendChild(plugins); 1456 rootElement.AppendChild(plugins);
1451 1457
1452 instance.Start(); 1458 if(running)
1459 instance.Start();
1453 1460
1454 return xmldoc.InnerXml; 1461 return xmldoc.InnerXml;
1455 } 1462 }