aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
diff options
context:
space:
mode:
authorJeff Ames2008-06-09 08:46:33 +0000
committerJeff Ames2008-06-09 08:46:33 +0000
commitdfb63b56230bdd3bfd897d499ce977ea9ee9891d (patch)
tree1d340aa26183382142d5df917388eacc3084033c /OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
parentMantis#1469. Thank you kindly, Mikem for a patch that addresses: (diff)
downloadopensim-SC-dfb63b56230bdd3bfd897d499ce977ea9ee9891d.zip
opensim-SC-dfb63b56230bdd3bfd897d499ce977ea9ee9891d.tar.gz
opensim-SC-dfb63b56230bdd3bfd897d499ce977ea9ee9891d.tar.bz2
opensim-SC-dfb63b56230bdd3bfd897d499ce977ea9ee9891d.tar.xz
Update svn properties. Formatting cleanup.
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/ScriptEngine/XEngine/XEngine.cs20
1 files changed, 10 insertions, 10 deletions
diff --git a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
index a5da317..0b0ff3d 100644
--- a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
+++ b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
@@ -701,10 +701,10 @@ namespace OpenSim.Region.ScriptEngine.XEngine
701 public void Populate(Scene scene) 701 public void Populate(Scene scene)
702 { 702 {
703 SceneObjectPart part = scene.GetSceneObjectPart(Key); 703 SceneObjectPart part = scene.GetSceneObjectPart(Key);
704 if(part == null) // Avatar, maybe? 704 if (part == null) // Avatar, maybe?
705 { 705 {
706 ScenePresence presence = scene.GetScenePresence(Key); 706 ScenePresence presence = scene.GetScenePresence(Key);
707 if(presence == null) 707 if (presence == null)
708 return; 708 return;
709 709
710 Name = presence.Firstname + " " + presence.Lastname; 710 Name = presence.Firstname + " " + presence.Lastname;
@@ -724,7 +724,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
724 presence.Velocity.Z); 724 presence.Velocity.Z);
725 725
726 Type = 0x01; // Avatar 726 Type = 0x01; // Avatar
727 if(presence.Velocity != LLVector3.Zero) 727 if (presence.Velocity != LLVector3.Zero)
728 Type |= 0x02; // Active 728 Type |= 0x02; // Active
729 729
730 Group = presence.ControllingClient.ActiveGroupId; 730 Group = presence.ControllingClient.ActiveGroupId;
@@ -739,14 +739,14 @@ namespace OpenSim.Region.ScriptEngine.XEngine
739 Group = part.GroupID; 739 Group = part.GroupID;
740 Name = part.Name; 740 Name = part.Name;
741 Owner = part.OwnerID; 741 Owner = part.OwnerID;
742 if(part.Velocity == LLVector3.Zero) 742 if (part.Velocity == LLVector3.Zero)
743 Type = 0x04; // Passive 743 Type = 0x04; // Passive
744 else 744 else
745 Type = 0x02; // Passive 745 Type = 0x02; // Passive
746 746
747 foreach (SceneObjectPart p in part.ParentGroup.Children.Values) 747 foreach (SceneObjectPart p in part.ParentGroup.Children.Values)
748 { 748 {
749 if(part.ContainsScripts()) 749 if (part.ContainsScripts())
750 { 750 {
751 Type |= 0x08; // Scripted 751 Type |= 0x08; // Scripted
752 break; 752 break;
@@ -964,7 +964,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
964 964
965 m_Engine.Log.DebugFormat("[XEngine] Successfully retrieved state for script {0}.{1}", m_PrimName, m_ScriptName); 965 m_Engine.Log.DebugFormat("[XEngine] Successfully retrieved state for script {0}.{1}", m_PrimName, m_ScriptName);
966 966
967 if(m_RunEvents) 967 if (m_RunEvents)
968 { 968 {
969 m_RunEvents = false; 969 m_RunEvents = false;
970 Start(); 970 Start();
@@ -973,7 +973,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
973 // we get new rez events on sim restart, too 973 // we get new rez events on sim restart, too
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 { 977 {
978// m_Engine.Log.Debug("[XEngine] Posted changed(CHANGED_REGION_RESTART) to script"); 978// m_Engine.Log.Debug("[XEngine] Posted changed(CHANGED_REGION_RESTART) to script");
979 PostEvent(new XEventParams("changed", 979 PostEvent(new XEventParams("changed",
@@ -1315,7 +1315,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
1315 { 1315 {
1316 Console.WriteLine("Unable to save xml\n"+e.ToString()); 1316 Console.WriteLine("Unable to save xml\n"+e.ToString());
1317 } 1317 }
1318 if(!File.Exists(Path.Combine(Path.GetDirectoryName(assembly), m_ItemID.ToString() + ".state"))) 1318 if (!File.Exists(Path.Combine(Path.GetDirectoryName(assembly), m_ItemID.ToString() + ".state")))
1319 { 1319 {
1320 throw new Exception("Completed persistence save, but no file was created"); 1320 throw new Exception("Completed persistence save, but no file was created");
1321 } 1321 }
@@ -1328,7 +1328,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
1328 { 1328 {
1329 bool running = instance.Running; 1329 bool running = instance.Running;
1330 1330
1331 if(running) 1331 if (running)
1332 instance.Stop(50); 1332 instance.Stop(50);
1333 1333
1334 XmlDocument xmldoc = new XmlDocument(); 1334 XmlDocument xmldoc = new XmlDocument();
@@ -1455,7 +1455,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
1455 1455
1456 rootElement.AppendChild(plugins); 1456 rootElement.AppendChild(plugins);
1457 1457
1458 if(running) 1458 if (running)
1459 instance.Start(); 1459 instance.Start();
1460 1460
1461 return xmldoc.InnerXml; 1461 return xmldoc.InnerXml;