diff options
author | Mike Rieker | 2010-07-06 02:23:10 +0000 |
---|---|---|
committer | Mike Rieker | 2010-07-06 02:23:10 +0000 |
commit | 6e7f1a3ac11b889175c87f59a3c5361c704363a6 (patch) | |
tree | 2ed5bebf54db3adc420e1510045b84b880ecb157 /OpenSim/Region/ScriptEngine/XEngine/XEngine.cs | |
parent | rewrote hanging llParseStringKeepNulls() (diff) | |
parent | Undo fix is now complete. This commit repairs the special case of the root pr... (diff) | |
download | opensim-SC_OLD-6e7f1a3ac11b889175c87f59a3c5361c704363a6.zip opensim-SC_OLD-6e7f1a3ac11b889175c87f59a3c5361c704363a6.tar.gz opensim-SC_OLD-6e7f1a3ac11b889175c87f59a3c5361c704363a6.tar.bz2 opensim-SC_OLD-6e7f1a3ac11b889175c87f59a3c5361c704363a6.tar.xz |
Merge branch 'careminster-presence-refactor' of www.3dhosting.de:/var/git/careminster into careminster-presence-refactor
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/ScriptEngine/XEngine/XEngine.cs | 43 |
1 files changed, 37 insertions, 6 deletions
diff --git a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs index 30e127d..a6ab5e9 100644 --- a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs +++ b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs | |||
@@ -556,6 +556,11 @@ namespace OpenSim.Region.ScriptEngine.XEngine | |||
556 | 556 | ||
557 | if (stateSource == (int)StateSource.ScriptedRez) | 557 | if (stateSource == (int)StateSource.ScriptedRez) |
558 | { | 558 | { |
559 | lock (m_CompileDict) | ||
560 | { | ||
561 | m_CompileDict[itemID] = 0; | ||
562 | } | ||
563 | |||
559 | DoOnRezScript(parms); | 564 | DoOnRezScript(parms); |
560 | } | 565 | } |
561 | else | 566 | else |
@@ -835,8 +840,10 @@ namespace OpenSim.Region.ScriptEngine.XEngine | |||
835 | item.Name, startParam, postOnRez, | 840 | item.Name, startParam, postOnRez, |
836 | stateSource, m_MaxScriptQueue); | 841 | stateSource, m_MaxScriptQueue); |
837 | 842 | ||
838 | m_log.DebugFormat("[XEngine] Loaded script {0}.{1}, script UUID {2}, prim UUID {3} @ {4}", | 843 | m_log.DebugFormat( |
839 | part.ParentGroup.RootPart.Name, item.Name, assetID, part.UUID, part.ParentGroup.RootPart.AbsolutePosition.ToString()); | 844 | "[XEngine] Loaded script {0}.{1}, script UUID {2}, prim UUID {3} @ {4}.{5}", |
845 | part.ParentGroup.RootPart.Name, item.Name, assetID, part.UUID, | ||
846 | part.ParentGroup.RootPart.AbsolutePosition, part.ParentGroup.Scene.RegionInfo.RegionName); | ||
840 | 847 | ||
841 | if (presence != null) | 848 | if (presence != null) |
842 | { | 849 | { |
@@ -1356,9 +1363,23 @@ namespace OpenSim.Region.ScriptEngine.XEngine | |||
1356 | string xml = instance.GetXMLState(); | 1363 | string xml = instance.GetXMLState(); |
1357 | 1364 | ||
1358 | XmlDocument sdoc = new XmlDocument(); | 1365 | XmlDocument sdoc = new XmlDocument(); |
1359 | sdoc.LoadXml(xml); | 1366 | bool loadedState = true; |
1360 | XmlNodeList rootL = sdoc.GetElementsByTagName("ScriptState"); | 1367 | try |
1361 | XmlNode rootNode = rootL[0]; | 1368 | { |
1369 | sdoc.LoadXml(xml); | ||
1370 | } | ||
1371 | catch (System.Xml.XmlException e) | ||
1372 | { | ||
1373 | loadedState = false; | ||
1374 | } | ||
1375 | |||
1376 | XmlNodeList rootL = null; | ||
1377 | XmlNode rootNode = null; | ||
1378 | if (loadedState) | ||
1379 | { | ||
1380 | rootL = sdoc.GetElementsByTagName("ScriptState"); | ||
1381 | rootNode = rootL[0]; | ||
1382 | } | ||
1362 | 1383 | ||
1363 | // Create <State UUID="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"> | 1384 | // Create <State UUID="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"> |
1364 | XmlDocument doc = new XmlDocument(); | 1385 | XmlDocument doc = new XmlDocument(); |
@@ -1374,8 +1395,18 @@ namespace OpenSim.Region.ScriptEngine.XEngine | |||
1374 | stateData.Attributes.Append(engineName); | 1395 | stateData.Attributes.Append(engineName); |
1375 | doc.AppendChild(stateData); | 1396 | doc.AppendChild(stateData); |
1376 | 1397 | ||
1398 | XmlNode xmlstate = null; | ||
1399 | |||
1377 | // Add <ScriptState>...</ScriptState> | 1400 | // Add <ScriptState>...</ScriptState> |
1378 | XmlNode xmlstate = doc.ImportNode(rootNode, true); | 1401 | if (loadedState) |
1402 | { | ||
1403 | xmlstate = doc.ImportNode(rootNode, true); | ||
1404 | } | ||
1405 | else | ||
1406 | { | ||
1407 | xmlstate = doc.CreateElement("", "ScriptState", ""); | ||
1408 | } | ||
1409 | |||
1379 | stateData.AppendChild(xmlstate); | 1410 | stateData.AppendChild(xmlstate); |
1380 | 1411 | ||
1381 | string assemName = instance.GetAssemblyName(); | 1412 | string assemName = instance.GetAssemblyName(); |