From e5b91442822df211f9f8277aaf0c40e1339810f3 Mon Sep 17 00:00:00 2001
From: Jeff Ames
Date: Tue, 18 Mar 2008 15:30:38 +0000
Subject: Formatting cleanup.

---
 OpenSim/Region/Application/OpenSimMain.cs          |  97 +++++++--------
 OpenSim/Region/ClientStack/UDPServer.cs            |  94 +++++++--------
 .../Region/Communications/OGS1/OGS1GridServices.cs |  42 +++----
 OpenSim/Region/Environment/Modules/ChatModule.cs   |  49 ++++----
 .../Environment/Modules/VectorRenderModule.cs      |  73 ++++++------
 OpenSim/Region/Environment/PermissionManager.cs    |  20 ++--
 OpenSim/Region/Environment/Scenes/Scene.cs         | 130 ++++++++++-----------
 OpenSim/Region/Environment/Scenes/ScenePresence.cs | 120 ++++++++++---------
 .../Common/LSL_BuiltIn_Commands_Interface.cs       |   6 +-
 9 files changed, 320 insertions(+), 311 deletions(-)

(limited to 'OpenSim/Region')

diff --git a/OpenSim/Region/Application/OpenSimMain.cs b/OpenSim/Region/Application/OpenSimMain.cs
index e8490dc..e50187e 100644
--- a/OpenSim/Region/Application/OpenSimMain.cs
+++ b/OpenSim/Region/Application/OpenSimMain.cs
@@ -455,7 +455,7 @@ namespace OpenSim
 
             // set initial ServerURI
             regionInfo.ServerURI = "http://" + regionInfo.ExternalHostName 
-                                        + ":" + regionInfo.InternalEndPoint.Port.ToString();
+                + ":" + regionInfo.InternalEndPoint.Port.ToString();
 
             if ((proxyUrl.Length > 0) && (portadd_flag)) 
             {
@@ -616,7 +616,7 @@ namespace OpenSim
         public virtual void Shutdown()
         {
             ProxyCommand(proxyUrl, "Stop"); 
-			
+
             if (m_startupCommandsFile != String.Empty)
             {
                 RunCommandScript(m_shutdownCommandsFile);
@@ -632,7 +632,7 @@ namespace OpenSim
 
             m_console.Close();
             Environment.Exit(0);
-		}
+        }
 
         private void RunAutoTimerScript(object sender, EventArgs e)
         {
@@ -722,17 +722,23 @@ namespace OpenSim
                     }
                     break;
 
-		case "scene-debug":
-			if (cmdparams.Length == 3) {
-				if (m_sceneManager.CurrentScene == null) {
-					m_console.Error("CONSOLE", "Please use 'change-region <regioname>' first");
-				} else {
-					m_sceneManager.CurrentScene.SetSceneCoreDebug(!System.Convert.ToBoolean(cmdparams[0]), !System.Convert.ToBoolean(cmdparams[1]), !System.Convert.ToBoolean(cmdparams[2]));
-				}
-			} else {
-				m_console.Error("scene-debug <scripting> <collisions> <physics> (where inside <> is true/false)");
-			}
-			break;
+                case "scene-debug":
+                    if (cmdparams.Length == 3)
+                    {
+                        if (m_sceneManager.CurrentScene == null)
+                        {
+                            m_console.Error("CONSOLE", "Please use 'change-region <regioname>' first");
+                        }
+                        else
+                        {
+                            m_sceneManager.CurrentScene.SetSceneCoreDebug(!System.Convert.ToBoolean(cmdparams[0]), !System.Convert.ToBoolean(cmdparams[1]), !System.Convert.ToBoolean(cmdparams[2]));
+                        }
+                    }
+                    else
+                    {
+                        m_console.Error("scene-debug <scripting> <collisions> <physics> (where inside <> is true/false)");
+                    }
+                    break;
 
                 case "help":
                     m_console.Notice("alert - send alert to a designated user or all users.");
@@ -772,15 +778,15 @@ namespace OpenSim
                     break;
 
                 case "threads":
-                        //m_console.Notice("THREAD", Process.GetCurrentProcess().Threads.Count + " threads running:");
-                        //int _tc = 0;
+//                     m_console.Notice("THREAD", Process.GetCurrentProcess().Threads.Count + " threads running:");
+//                     int _tc = 0;
                     
-                        //foreach (ProcessThread pt in Process.GetCurrentProcess().Threads)
-                        //{
-                        //    _tc++;
-                        //    m_console.Notice("THREAD", _tc + ": ID: " + pt.Id + ", Started: " + pt.StartTime.ToString() + ", CPU time: " + pt.TotalProcessorTime + ", Pri: " + pt.BasePriority.ToString() + ", State: " + pt.ThreadState.ToString());
-                            
-                        //}
+//                     foreach (ProcessThread pt in Process.GetCurrentProcess().Threads)
+//                     {
+//                         _tc++;
+//                         m_console.Notice("THREAD", _tc + ": ID: " + pt.Id + ", Started: " + pt.StartTime.ToString() + ", CPU time: " + pt.TotalProcessorTime + ", Pri: " + pt.BasePriority.ToString() + ", State: " + pt.ThreadState.ToString());
+//                     }
+
                     List<Thread> threads = OpenSim.Framework.ThreadTracker.GetThreads();
                     if (threads == null)
                     {
@@ -797,7 +803,6 @@ namespace OpenSim
                         }
                     }
 
-
                     break;
                 case "save-xml":
                     if (cmdparams.Length > 0)
@@ -833,7 +838,7 @@ namespace OpenSim
                                     loadOffset.Z = (float) Convert.ToDecimal(cmdparams[4]);
                                 }
                                 m_console.Error("loadOffsets <X,Y,Z> = <" + loadOffset.X + "," + loadOffset.Y + "," +
-                                                    loadOffset.Z + ">");
+                                                loadOffset.Z + ">");
                             }
                         }
                         m_sceneManager.LoadCurrentSceneFromXml(cmdparams[0], generateNewIDS, loadOffset);
@@ -1158,11 +1163,11 @@ namespace OpenSim
                 case "regions":
                     m_sceneManager.ForEachScene(
                         delegate(Scene scene)
-                            {
-                                m_console.Notice("Region Name: " + scene.RegionInfo.RegionName + " , Region XLoc: " +
-                                                 scene.RegionInfo.RegionLocX + " , Region YLoc: " +
-                                                 scene.RegionInfo.RegionLocY);
-                            });
+                        {
+                            m_console.Notice("Region Name: " + scene.RegionInfo.RegionName + " , Region XLoc: " +
+                                             scene.RegionInfo.RegionLocX + " , Region YLoc: " +
+                                             scene.RegionInfo.RegionLocY);
+                        });
                     break;
                                     
                 case "stats":
@@ -1191,7 +1196,8 @@ namespace OpenSim
         }
 
         #endregion
-		// TODO: remove me!! (almost same as XmlRpcCommand)
+
+        // TODO: remove me!! (almost same as XmlRpcCommand)
         public object ProxyCommand(string url, string methodName, params object[] args)
         {
             if(proxyUrl.Length==0) return null;
@@ -1230,34 +1236,33 @@ namespace OpenSim
         /// <param name="starttime">The first out parameter describing when the Region server started</param>
         /// <param name="uptime">The second out parameter describing how long the Region server has run</param>
         public void GetRunTime(out string starttime, out string uptime)
-		{
-			starttime = m_startuptime.ToString();
-			uptime = (DateTime.Now - m_startuptime).ToString();
-		}
+        {
+            starttime = m_startuptime.ToString();
+            uptime = (DateTime.Now - m_startuptime).ToString();
+        }
 
         /// <summary>
         /// Get the number of the avatars in the Region server
         /// </summary>
         /// <param name="usernum">The first out parameter describing the number of all the avatars in the Region server</param>
         public void GetAvatarNumber(out int usernum)
-		{
-			usernum = m_sceneManager.GetCurrentSceneAvatars().Count;
-		}
+        {
+            usernum = m_sceneManager.GetCurrentSceneAvatars().Count;
+        }
 
         /// <summary>
         /// Get the number of the avatars in the Region server
         /// </summary>
         /// <param name="usernum">The first out parameter describing the number of all the avatars in the Region server</param>
         public void GetRegionNumber(out int regionnum)
-		{
-			int accounter = 0;
-			//List<string> regionNameList = new List<string>();
-
-			m_sceneManager.ForEachScene(delegate(Scene scene) {
-				accounter++;
-			});
-			regionnum = accounter;
+        {
+            int accounter = 0;
+            //List<string> regionNameList = new List<string>();
 
-		}
+            m_sceneManager.ForEachScene(delegate(Scene scene) {
+                    accounter++;
+                });
+            regionnum = accounter;
+        }
     }
 }
diff --git a/OpenSim/Region/ClientStack/UDPServer.cs b/OpenSim/Region/ClientStack/UDPServer.cs
index 69dd48f..59083c7 100644
--- a/OpenSim/Region/ClientStack/UDPServer.cs
+++ b/OpenSim/Region/ClientStack/UDPServer.cs
@@ -226,7 +226,7 @@ namespace OpenSim.Region.ClientStack
 
             try
             {
-               packet = PacketPool.Instance.GetPacket(RecvBuffer, ref packetEnd, ZeroBuffer);
+                packet = PacketPool.Instance.GetPacket(RecvBuffer, ref packetEnd, ZeroBuffer);
             }
             catch (Exception e)
             {
@@ -308,7 +308,7 @@ namespace OpenSim.Region.ClientStack
                     {
                         m_log.Error("[UDPSERVER]: Adding New Client threw exception " + e3.ToString());
                         Server.BeginReceiveFrom(RecvBuffer, 0, RecvBuffer.Length, SocketFlags.None, ref epSender,
-                                                    ReceivedData, null);
+                                                ReceivedData, null);
                     }
                 }
             }
@@ -332,31 +332,31 @@ namespace OpenSim.Region.ClientStack
             //Slave regions don't accept new clients
             if(m_localScene.Region_Status != RegionStatus.SlaveScene)
             {
-            UseCircuitCodePacket useCircuit = (UseCircuitCodePacket) packet;
-            lock (clientCircuits)
-            {
-                if (!clientCircuits.ContainsKey(epSender))
-                    clientCircuits.Add(epSender, useCircuit.CircuitCode.Code);
-                else
-                    m_log.Error("[UDPSERVER]: clientCircuits already contans entry for user " + useCircuit.CircuitCode.Code.ToString() + ". NOT adding.");
-            }
-            lock (clientCircuits_reverse)
-            {
-                if (!clientCircuits_reverse.ContainsKey(useCircuit.CircuitCode.Code))
-                    clientCircuits_reverse.Add(useCircuit.CircuitCode.Code, epSender);
-                else
-                    m_log.Error("[UDPSERVER]: clientCurcuits_reverse already contains entry for user " + useCircuit.CircuitCode.Code.ToString() + ". NOT adding.");
-            }
+                UseCircuitCodePacket useCircuit = (UseCircuitCodePacket) packet;
+                lock (clientCircuits)
+                {
+                    if (!clientCircuits.ContainsKey(epSender))
+                        clientCircuits.Add(epSender, useCircuit.CircuitCode.Code);
+                    else
+                        m_log.Error("[UDPSERVER]: clientCircuits already contans entry for user " + useCircuit.CircuitCode.Code.ToString() + ". NOT adding.");
+                }
+                lock (clientCircuits_reverse)
+                {
+                    if (!clientCircuits_reverse.ContainsKey(useCircuit.CircuitCode.Code))
+                        clientCircuits_reverse.Add(useCircuit.CircuitCode.Code, epSender);
+                    else
+                        m_log.Error("[UDPSERVER]: clientCurcuits_reverse already contains entry for user " + useCircuit.CircuitCode.Code.ToString() + ". NOT adding.");
+                }
 
-            lock (proxyCircuits)
-            {
-                if (!proxyCircuits.ContainsKey(useCircuit.CircuitCode.Code))
-                    proxyCircuits.Add(useCircuit.CircuitCode.Code, epProxy);
-                else
-                    m_log.Error("[UDPSERVER]: proxyCircuits already contains entry for user " + useCircuit.CircuitCode.Code.ToString() + ". NOT adding.");
-            }
+                lock (proxyCircuits)
+                {
+                    if (!proxyCircuits.ContainsKey(useCircuit.CircuitCode.Code))
+                        proxyCircuits.Add(useCircuit.CircuitCode.Code, epProxy);
+                    else
+                        m_log.Error("[UDPSERVER]: proxyCircuits already contains entry for user " + useCircuit.CircuitCode.Code.ToString() + ". NOT adding.");
+                }
 
-	        PacketServer.AddNewClient(epSender, useCircuit, m_assetCache, m_authenticateSessionsClass, epProxy);
+                PacketServer.AddNewClient(epSender, useCircuit, m_assetCache, m_authenticateSessionsClass, epProxy);
             }
             PacketPool.Instance.ReturnPacket(packet);
         }
@@ -394,20 +394,20 @@ namespace OpenSim.Region.ClientStack
             lock (clientCircuits_reverse)
             {
                 if (clientCircuits_reverse.TryGetValue(circuitcode, out sendto))
-				{
-	                //we found the endpoint so send the packet to it
-	                if (proxyPortOffset != 0)
-	                {
-	                    //MainLog.Instance.Verbose("UDPSERVER", "SendPacketTo proxy " + proxyCircuits[circuitcode].ToString() + ": client " + sendto.ToString());
-	                    PacketPool.EncodeProxyMessage(buffer, ref size, sendto);
-	                    Server.SendTo(buffer, size, flags, proxyCircuits[circuitcode]);
-	                }
-	                else
-	                {
-	                    //MainLog.Instance.Verbose("UDPSERVER", "SendPacketTo : client " + sendto.ToString());
-	                    Server.SendTo(buffer, size, flags, sendto);
-	                }
-				}
+                {
+                    //we found the endpoint so send the packet to it
+                    if (proxyPortOffset != 0)
+                    {
+                        //MainLog.Instance.Verbose("UDPSERVER", "SendPacketTo proxy " + proxyCircuits[circuitcode].ToString() + ": client " + sendto.ToString());
+                        PacketPool.EncodeProxyMessage(buffer, ref size, sendto);
+                        Server.SendTo(buffer, size, flags, proxyCircuits[circuitcode]);
+                    }
+                    else
+                    {
+                        //MainLog.Instance.Verbose("UDPSERVER", "SendPacketTo : client " + sendto.ToString());
+                        Server.SendTo(buffer, size, flags, sendto);
+                    }
+                }
             }
         }
 
@@ -421,7 +421,7 @@ namespace OpenSim.Region.ClientStack
                     clientCircuits.Remove(sendto);
 
                     clientCircuits_reverse.Remove(circuitcode);
-	                proxyCircuits.Remove(circuitcode);
+                    proxyCircuits.Remove(circuitcode);
                 }
             }
         }
@@ -435,7 +435,7 @@ namespace OpenSim.Region.ClientStack
             useCircuit.CircuitCode.ID = circuit.AgentID;
             useCircuit.CircuitCode.SessionID = circuit.SessionID;
 
-	            lock (clientCircuits)
+            lock (clientCircuits)
             {
                 if (!clientCircuits.ContainsKey(userEP))
                     clientCircuits.Add(userEP, useCircuit.CircuitCode.Code);
@@ -453,15 +453,15 @@ namespace OpenSim.Region.ClientStack
             lock (proxyCircuits)
             {
                 if (!proxyCircuits.ContainsKey(useCircuit.CircuitCode.Code))
-				{
+                {
                     proxyCircuits.Add(useCircuit.CircuitCode.Code, proxyEP);
-				}
+                }
                 else
-				{
-					// re-set proxy endpoint
-	                proxyCircuits.Remove(useCircuit.CircuitCode.Code);
+                {
+                    // re-set proxy endpoint
+                    proxyCircuits.Remove(useCircuit.CircuitCode.Code);
                     proxyCircuits.Add(useCircuit.CircuitCode.Code, proxyEP);
-				}
+                }
             }
 
             PacketServer.AddNewClient(userEP, useCircuit, m_assetCache, m_authenticateSessionsClass, proxyEP);
diff --git a/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs b/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs
index f324886..432c3c2 100644
--- a/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs
+++ b/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs
@@ -111,7 +111,7 @@ namespace OpenSim.Region.Communications.OGS1
             GridParams["remoting_port"] = NetworkServersInfo.RemotingListenerPort.ToString();
             GridParams["map-image-id"] = regionInfo.EstateSettings.terrainImageID.ToString();
             GridParams["originUUID"] = regionInfo.originRegionID.ToString();
-			GridParams["server_uri"] = regionInfo.ServerURI;
+            GridParams["server_uri"] = regionInfo.ServerURI;
 
             // part of an initial brutish effort to provide accurate information (as per the xml region spec)
             // wrt the ownership of a given region
@@ -190,7 +190,7 @@ namespace OpenSim.Region.Communications.OGS1
                 return false;
             }
 
-			// What does DeregisterRegion() do?
+            // What does DeregisterRegion() do?
             return m_localBackend.DeregisterRegion(regionInfo);
         }
 
@@ -633,10 +633,10 @@ namespace OpenSim.Region.Communications.OGS1
                             m_log.Warn("[OGS1 GRID SERVICES]: remoting object not found");
                         }
                         remObject = null;
-                        //m_log.Info("[INTER]: " +
-                                                 //gdebugRegionName +
-                                                 //": OGS1 tried to Update Child Agent data on outside region and got " +
-                                                 //retValue.ToString());
+//                         m_log.Info("[INTER]: " +
+//                                    gdebugRegionName +
+//                                    ": OGS1 tried to Update Child Agent data on outside region and got " +
+//                                    retValue.ToString());
 
                         return retValue;
                     }
@@ -693,7 +693,7 @@ namespace OpenSim.Region.Communications.OGS1
                     NoteDeadRegion(regionHandle);
                 
                     m_log.WarnFormat("[OGS1 GRID SERVICES]: Unable to connect to adjacent region: {0} {1},{2}",
-                        regInfo.RegionName, regInfo.RegionLocX, regInfo.RegionLocY);
+                                     regInfo.RegionName, regInfo.RegionLocX, regInfo.RegionLocY);
                     m_log.DebugFormat("[OGS1 GRID SERVICES]: {0} {1}", e.Source, e.Message);
                 
                     return false;
@@ -1194,7 +1194,7 @@ namespace OpenSim.Region.Communications.OGS1
             {
                 NoteDeadRegion(regionHandle);
                 m_log.Warn("[OGS1 GRID SERVICES]: Remoting Error: Unable to connect to adjacent region to tell it to close child agents: " + regInfo.RegionName +
-                                      " " + regInfo.RegionLocX + "," + regInfo.RegionLocY);
+                           " " + regInfo.RegionLocX + "," + regInfo.RegionLocY);
                 //m_log.Debug(e.ToString());
                 return false;
             }
@@ -1202,10 +1202,10 @@ namespace OpenSim.Region.Communications.OGS1
             {
                 NoteDeadRegion(regionHandle);
                 m_log.Warn("[OGS1 GRID SERVICES]: Socket Error: Unable to connect to adjacent region using tcp://" +
-                                      regInfo.RemotingAddress +
-                                      ":" + regInfo.RemotingPort +
-                                      "/InterRegions - @ " + regInfo.RegionLocX + "," + regInfo.RegionLocY +
-                                      " - Is this neighbor up?");
+                           regInfo.RemotingAddress +
+                           ":" + regInfo.RemotingPort +
+                           "/InterRegions - @ " + regInfo.RegionLocX + "," + regInfo.RegionLocY +
+                           " - Is this neighbor up?");
                 m_log.DebugFormat("[OGS1 GRID SERVICES]: {0} {1}", e.Source, e.Message);
                 return false;
             }
@@ -1213,9 +1213,9 @@ namespace OpenSim.Region.Communications.OGS1
             {
                 NoteDeadRegion(regionHandle);
                 m_log.Warn("[OGS1 GRID SERVICES]: Invalid Credentials: Unable to connect to adjacent region using tcp://" +
-                                      regInfo.RemotingAddress +
-                                      ":" + regInfo.RemotingPort +
-                                      "/InterRegions - @ " + regInfo.RegionLocX + "," + regInfo.RegionLocY);
+                           regInfo.RemotingAddress +
+                           ":" + regInfo.RemotingPort +
+                           "/InterRegions - @ " + regInfo.RegionLocX + "," + regInfo.RegionLocY);
                 m_log.DebugFormat("[OGS1 GRID SERVICES]: {0} {1}", e.Source, e.Message);
                 return false;
             }
@@ -1223,9 +1223,9 @@ namespace OpenSim.Region.Communications.OGS1
             {
                 NoteDeadRegion(regionHandle);
                 m_log.Warn("[OGS1 GRID SERVICES]: Authentication exception: Unable to connect to adjacent region using tcp://" +
-                                      regInfo.RemotingAddress +
-                                      ":" + regInfo.RemotingPort +
-                                      "/InterRegions - @ " + regInfo.RegionLocX + "," + regInfo.RegionLocY);
+                           regInfo.RemotingAddress +
+                           ":" + regInfo.RemotingPort +
+                           "/InterRegions - @ " + regInfo.RegionLocX + "," + regInfo.RegionLocY);
                 m_log.DebugFormat("[OGS1 GRID SERVICES]: {0} {1}", e.Source, e.Message);
                 return false;
             }
@@ -1233,9 +1233,9 @@ namespace OpenSim.Region.Communications.OGS1
             {
                 NoteDeadRegion(regionHandle);
                 m_log.Warn("[OGS1 GRID SERVICES]: WebException exception: Unable to connect to adjacent region using tcp://" +
-                                      regInfo.RemotingAddress +
-                                      ":" + regInfo.RemotingPort +
-                                      "/InterRegions - @ " + regInfo.RegionLocX + "," + regInfo.RegionLocY);
+                           regInfo.RemotingAddress +
+                           ":" + regInfo.RemotingPort +
+                           "/InterRegions - @ " + regInfo.RegionLocX + "," + regInfo.RegionLocY);
                 m_log.DebugFormat("[OGS1 GRID SERVICES]: {0} {1}", e.Source, e.Message);
                 return false;
             }
diff --git a/OpenSim/Region/Environment/Modules/ChatModule.cs b/OpenSim/Region/Environment/Modules/ChatModule.cs
index 6638e95..ab6b791 100644
--- a/OpenSim/Region/Environment/Modules/ChatModule.cs
+++ b/OpenSim/Region/Environment/Modules/ChatModule.cs
@@ -91,7 +91,8 @@ namespace OpenSim.Region.Environment.Modules
 
                 // setup IRC Relay
                 if (m_irc == null) { m_irc = new IRCChatModule(config); }
-                if (m_irc_connector == null) { 
+                if (m_irc_connector == null)
+                {
                     m_irc_connector = new Thread(IRCConnectRun);
                     m_irc_connector.Name = "IRCConnectorThread";
                     m_irc_connector.IsBackground = true;
@@ -106,12 +107,14 @@ namespace OpenSim.Region.Environment.Modules
                 try
                 {
                     //m_irc.Connect(m_scenes);
-                    if (m_irc_connector == null) { 
+                    if (m_irc_connector == null)
+                    {
                         m_irc_connector = new Thread(IRCConnectRun);
                         m_irc_connector.Name = "IRCConnectorThread";
                         m_irc_connector.IsBackground = true;
                     }
-                    if (!m_irc_connector.IsAlive) { 
+                    if (!m_irc_connector.IsAlive)
+                    {
                         m_irc_connector.Start();
                         OpenSim.Framework.ThreadTracker.Add(m_irc_connector);
                     }
@@ -255,11 +258,14 @@ namespace OpenSim.Region.Environment.Modules
                 // In a non-blocking way. Eventually the connector will get it started
                 try
                 {
-                    if (m_irc_connector == null) { m_irc_connector = new Thread(IRCConnectRun);
-                    m_irc_connector.Name = "IRCConnectorThread";
-                    m_irc_connector.IsBackground = true;
+                    if (m_irc_connector == null)
+                    {
+                        m_irc_connector = new Thread(IRCConnectRun);
+                        m_irc_connector.Name = "IRCConnectorThread";
+                        m_irc_connector.IsBackground = true;
                     }
-                    if (!m_irc_connector.IsAlive) { 
+                    if (!m_irc_connector.IsAlive)
+                    {
                         m_irc_connector.Start();
                         OpenSim.Framework.ThreadTracker.Add(m_irc_connector);
                     }
@@ -298,7 +304,6 @@ namespace OpenSim.Region.Environment.Modules
                 if ((m_irc.Enabled)&&(!m_irc.Connected))
                 {
                     m_irc.Connect(m_scenes);
-
                 }
                 Thread.Sleep(15000);
             }
@@ -625,15 +630,15 @@ namespace OpenSim.Region.Environment.Modules
                 foreach (Scene m_scene in m_scenes)
                 {
                     m_scene.ForEachScenePresence(delegate(ScenePresence avatar)
-                    {
-                        if (!avatar.IsChildAgent)
-                        {
-                            avatar.ControllingClient.SendChatMessage(
-                                Helpers.StringToField(message), 255,
-                                pos, sender,
-                                LLUUID.Zero);
-                        }
-                    });
+                                                 {
+                                                     if (!avatar.IsChildAgent)
+                                                     {
+                                                         avatar.ControllingClient.SendChatMessage(
+                                                             Helpers.StringToField(message), 255,
+                                                             pos, sender,
+                                                             LLUUID.Zero);
+                                                     }
+                                                 });
                 }
             }
             catch (Exception ex) // IRC gate should not crash Sim
@@ -644,15 +649,15 @@ namespace OpenSim.Region.Environment.Modules
 
         public enum ErrorReplies
         {
-            NotRegistered = 451,	// ":You have not registered"
-            NicknameInUse = 433		// "<nick> :Nickname is already in use"
+            NotRegistered = 451,  // ":You have not registered"
+            NicknameInUse = 433   // "<nick> :Nickname is already in use"
         }
 
         public enum Replies
         {
-            MotdStart = 375,		// ":- <server> Message of the day - "
-            Motd = 372,				// ":- <text>"
-            EndOfMotd = 376			// ":End of /MOTD command"
+            MotdStart = 375,  // ":- <server> Message of the day - "
+            Motd = 372,       // ":- <text>"
+            EndOfMotd = 376   // ":End of /MOTD command"
         }
 
         public void ProcessIRCCommand(string command)
diff --git a/OpenSim/Region/Environment/Modules/VectorRenderModule.cs b/OpenSim/Region/Environment/Modules/VectorRenderModule.cs
index 8bb903f..c0a00c9 100644
--- a/OpenSim/Region/Environment/Modules/VectorRenderModule.cs
+++ b/OpenSim/Region/Environment/Modules/VectorRenderModule.cs
@@ -126,41 +126,43 @@ namespace OpenSim.Region.Environment.Modules
 
         }
 
-        /* private void CairoDraw(string data, System.Drawing.Graphics graph)
-         {
-             using (Win32Surface draw = new Win32Surface(graph.GetHdc()))
-             {
-                 Context contex = new Context(draw);
-
-                 contex.Antialias = Antialias.None;	//fastest method but low quality
-                 contex.LineWidth = 7;
-                 char[] lineDelimiter = { ';' };
-                 char[] partsDelimiter = { ',' };
-                 string[] lines = data.Split(lineDelimiter);
-
-                 foreach (string line in lines)
-                 {
-                     string nextLine = line.Trim();
-
-                     if (nextLine.StartsWith("MoveTO"))
-                     {
-                         float x = 0;
-                         float y = 0;
-                         GetParams(partsDelimiter, ref nextLine, ref x, ref y);
-                         contex.MoveTo(x, y);
-                     }
-                     else if (nextLine.StartsWith("LineTo"))
-                     {
-                         float x = 0;
-                         float y = 0;
-                         GetParams(partsDelimiter, ref nextLine, ref x, ref y);
-                         contex.LineTo(x, y);
-                         contex.Stroke();
-                     }
-                 }
-             }
-             graph.ReleaseHdc();
-         }*/
+/*
+        private void CairoDraw(string data, System.Drawing.Graphics graph)
+        {
+            using (Win32Surface draw = new Win32Surface(graph.GetHdc()))
+            {
+                Context contex = new Context(draw);
+
+                contex.Antialias = Antialias.None;    //fastest method but low quality
+                contex.LineWidth = 7;
+                char[] lineDelimiter = { ';' };
+                char[] partsDelimiter = { ',' };
+                string[] lines = data.Split(lineDelimiter);
+
+                foreach (string line in lines)
+                {
+                    string nextLine = line.Trim();
+
+                    if (nextLine.StartsWith("MoveTO"))
+                    {
+                        float x = 0;
+                        float y = 0;
+                        GetParams(partsDelimiter, ref nextLine, ref x, ref y);
+                        contex.MoveTo(x, y);
+                    }
+                    else if (nextLine.StartsWith("LineTo"))
+                    {
+                        float x = 0;
+                        float y = 0;
+                        GetParams(partsDelimiter, ref nextLine, ref x, ref y);
+                        contex.LineTo(x, y);
+                        contex.Stroke();
+                    }
+                }
+            }
+            graph.ReleaseHdc();
+        }
+*/
 
         private void GDIDraw(string data, System.Drawing.Graphics graph)
         {
@@ -172,7 +174,6 @@ namespace OpenSim.Region.Environment.Modules
             char[] lineDelimiter = { ';' };
             char[] partsDelimiter = { ',' };
             string[] lines = data.Split(lineDelimiter);
-
              
             foreach (string line in lines)
             {
diff --git a/OpenSim/Region/Environment/PermissionManager.cs b/OpenSim/Region/Environment/PermissionManager.cs
index 8e2ea15..a23f119 100644
--- a/OpenSim/Region/Environment/PermissionManager.cs
+++ b/OpenSim/Region/Environment/PermissionManager.cs
@@ -201,12 +201,12 @@ namespace OpenSim.Region.Environment
 
             objflags &= (uint)
                 ~(LLObject.ObjectFlags.ObjectCopy | // Tells client you can copy the object
-                LLObject.ObjectFlags.ObjectModify | // tells client you can modify the object
-                LLObject.ObjectFlags.ObjectMove |   // tells client that you can move the object (only, no mod)
-                LLObject.ObjectFlags.ObjectTransfer | // tells the client that you can /take/ the object if you don't own it
-                LLObject.ObjectFlags.ObjectYouOwner | // Tells client that you're the owner of the object
-                LLObject.ObjectFlags.ObjectYouOfficer // Tells client that you've got group object editing permission. Used when ObjectGroupOwned is set
-                );
+                  LLObject.ObjectFlags.ObjectModify | // tells client you can modify the object
+                  LLObject.ObjectFlags.ObjectMove |   // tells client that you can move the object (only, no mod)
+                  LLObject.ObjectFlags.ObjectTransfer | // tells the client that you can /take/ the object if you don't own it
+                  LLObject.ObjectFlags.ObjectYouOwner | // Tells client that you're the owner of the object
+                  LLObject.ObjectFlags.ObjectYouOfficer // Tells client that you've got group object editing permission. Used when ObjectGroupOwned is set
+                    );
 
             // Creating the three ObjectFlags options for this method to choose from.
             // Customize the OwnerMask
@@ -495,10 +495,10 @@ namespace OpenSim.Region.Environment
             return IsAdministrator(user);
         }
 
-	public virtual bool CanRunConsoleCommand(LLUUID user)
-	{
-		return IsAdministrator(user);
-	}
+        public virtual bool CanRunConsoleCommand(LLUUID user)
+        {
+            return IsAdministrator(user);
+        }
 
         public virtual bool CanTerraform(LLUUID user, LLVector3 position)
         {
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index 1204020..6984d8f 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -227,6 +227,7 @@ namespace OpenSim.Region.Environment.Scenes
             get { return m_innerScene.RestorePresences; }
             set { m_innerScene.RestorePresences = value; }
         }
+
         #endregion
 
         #region Constructors
@@ -395,15 +396,15 @@ namespace OpenSim.Region.Environment.Scenes
                     try
                     {
                         ForEachScenePresence(delegate(ScenePresence agent)
+                                             {
+                                                 // If agent is a root agent.
+                                                 if (!agent.IsChildAgent)
                                                  {
-                                                     // If agent is a root agent.
-                                                     if (!agent.IsChildAgent)
-                                                     {
-                                                         //agent.ControllingClient.new
-                                                         //this.CommsManager.InterRegion.InformRegionOfChildAgent(otherRegion.RegionHandle, agent.ControllingClient.RequestClientInfo());
-                                                         InformClientOfNeighbor(agent, otherRegion);
-                                                     }
+                                                     //agent.ControllingClient.new
+                                                     //this.CommsManager.InterRegion.InformRegionOfChildAgent(otherRegion.RegionHandle, agent.ControllingClient.RequestClientInfo());
+                                                     InformClientOfNeighbor(agent, otherRegion);
                                                  }
+                                             }
                             );
                     }
                     catch (NullReferenceException)
@@ -463,7 +464,7 @@ namespace OpenSim.Region.Environment.Scenes
             {
                 if (m_RestartTimerCounter == 4 || m_RestartTimerCounter == 6 || m_RestartTimerCounter == 7)
                     SendRegionMessageFromEstateTools(LLUUID.Random(), LLUUID.Random(), String.Empty, RegionInfo.RegionName + ": Restarting in " +
-                        ((8 - m_RestartTimerCounter) * 15) + " seconds");
+                                                     ((8 - m_RestartTimerCounter) * 15) + " seconds");
 
                 // SendGeneralAlert(RegionInfo.RegionName + ": Restarting in " + ((8 - m_RestartTimerCounter)*15) +
                 //" seconds");
@@ -505,15 +506,15 @@ namespace OpenSim.Region.Environment.Scenes
                     try
                     {
                         ForEachScenePresence(delegate(ScenePresence agent)
+                                             {
+                                                 // If agent is a root agent.
+                                                 if (!agent.IsChildAgent)
                                                  {
-                                                     // If agent is a root agent.
-                                                     if (!agent.IsChildAgent)
-                                                     {
-                                                         //agent.ControllingClient.new
-                                                         //this.CommsManager.InterRegion.InformRegionOfChildAgent(otherRegion.RegionHandle, agent.ControllingClient.RequestClientInfo());
-                                                         InformClientOfNeighbor(agent, region);
-                                                     }
+                                                     //agent.ControllingClient.new
+                                                     //this.CommsManager.InterRegion.InformRegionOfChildAgent(otherRegion.RegionHandle, agent.ControllingClient.RequestClientInfo());
+                                                     InformClientOfNeighbor(agent, region);
                                                  }
+                                             }
                             );
                     }
                     catch (NullReferenceException)
@@ -580,16 +581,16 @@ namespace OpenSim.Region.Environment.Scenes
             m_log.Warn("[SCENE]: Closing down the single simulator: " + RegionInfo.RegionName);
             // Kick all ROOT agents with the message, 'The simulator is going down'
             ForEachScenePresence(delegate(ScenePresence avatar)
-                                     {
-                                         if (avatar.KnownChildRegions.Contains(RegionInfo.RegionHandle))
-                                             avatar.KnownChildRegions.Remove(RegionInfo.RegionHandle);
+                                 {
+                                     if (avatar.KnownChildRegions.Contains(RegionInfo.RegionHandle))
+                                         avatar.KnownChildRegions.Remove(RegionInfo.RegionHandle);
 
-                                         if (!avatar.IsChildAgent)
-                                             avatar.ControllingClient.Kick("The simulator is going down.");
+                                     if (!avatar.IsChildAgent)
+                                         avatar.ControllingClient.Kick("The simulator is going down.");
 
-                                         avatar.ControllingClient.OutPacket(PacketPool.Instance.GetPacket(libsecondlife.Packets.PacketType.DisableSimulator),
-                                                                            ThrottleOutPacketType.Task);
-                                     });
+                                     avatar.ControllingClient.OutPacket(PacketPool.Instance.GetPacket(libsecondlife.Packets.PacketType.DisableSimulator),
+                                                                        ThrottleOutPacketType.Task);
+                                 });
 
             // Wait here, or the kick messages won't actually get to the agents before the scene terminates.
             Thread.Sleep(500);
@@ -793,7 +794,7 @@ namespace OpenSim.Region.Environment.Scenes
                 {
                     tmpval = tmpval - (tmpval - 1.0f);
                 }
-                    m_timedilation = tmpval;
+                m_timedilation = tmpval;
                
                 m_lastupdate = DateTime.Now;
             }
@@ -884,9 +885,9 @@ namespace OpenSim.Region.Environment.Scenes
         {
             List<MapBlockData> mapBlocks =
                 m_sceneGridService.RequestNeighbourMapBlocks((int)(RegionInfo.RegionLocX - 9),
-                                                                   (int)(RegionInfo.RegionLocY - 9),
-                                                                   (int)(RegionInfo.RegionLocX + 9),
-                                                                   (int)(RegionInfo.RegionLocY + 9));
+                                                             (int)(RegionInfo.RegionLocY - 9),
+                                                             (int)(RegionInfo.RegionLocX + 9),
+                                                             (int)(RegionInfo.RegionLocY + 9));
             List<AssetBase> textures = new List<AssetBase>();
             List<Image> bitImages = new List<Image>();
 
@@ -1048,7 +1049,6 @@ namespace OpenSim.Region.Environment.Scenes
             m_log.Info("[SCENE]: Loaded " + PrimsFromDB.Count.ToString() + " SceneObject(s)");
         }
 
-
         /// <summary>
         /// Returns a new unallocated primitive ID
         /// </summary>
@@ -1134,7 +1134,7 @@ namespace OpenSim.Region.Environment.Scenes
         }
 
         public SceneObjectGroup AddTree(LLVector3 scale, LLQuaternion rotation, LLVector3 position,
-                            Tree treeType, bool newTree)
+                                        Tree treeType, bool newTree)
         {
             LLUUID uuid = this.RegionInfo.MasterAvatarAssignedUUID;
             PrimitiveBaseShape treeShape = new PrimitiveBaseShape();
@@ -1228,7 +1228,7 @@ namespace OpenSim.Region.Environment.Scenes
             {
                 pos.Y = ((pos.Y - Constants.RegionSize));
                 newRegionHandle = Util.UIntsToLong((uint)(thisx * Constants.RegionSize), (uint)((thisy + 1) * Constants.RegionSize));
-               // y + 1
+                // y + 1
             }
             else if (position.Y < -1f)
             {
@@ -1269,12 +1269,14 @@ namespace OpenSim.Region.Environment.Scenes
                 }
             }
         }
+
         public void IncomingInterRegionPrimGroup(ulong regionHandle, LLUUID primID, string objXMLData)
         {
             m_log.Warn("{[INTERREGION]: A new prim arrived from a neighbor");
             m_sceneXmlLoader.LoadGroupFromXml2String(objXMLData);
 
         }
+
         #endregion
 
         #region Add/Remove Avatar Methods
@@ -1301,11 +1303,11 @@ namespace OpenSim.Region.Environment.Scenes
 
                 m_innerScene.AddScenePresence(presence);
 
-				  lock (m_restorePresences)
-				{
-					Monitor.PulseAll(m_restorePresences);
-				}
-			}
+                lock (m_restorePresences)
+                {
+                    Monitor.PulseAll(m_restorePresences);
+                }
+            }
             else
             {
                 m_log.Info("[REGION]: Add New Scene Presence");
@@ -1382,8 +1384,8 @@ namespace OpenSim.Region.Environment.Scenes
             client.OnMoveInventoryItem += MoveInventoryItem;
             client.OnRemoveInventoryItem += RemoveInventoryItem;
             client.OnRemoveInventoryFolder += RemoveInventoryFolder;
-           // client.OnAssetUploadRequest += CommsManager.TransactionsManager.HandleUDPUploadRequest;
-          //  client.OnXferReceive += CommsManager.TransactionsManager.HandleXfer;
+            // client.OnAssetUploadRequest += CommsManager.TransactionsManager.HandleUDPUploadRequest;
+            //  client.OnXferReceive += CommsManager.TransactionsManager.HandleXfer;
             client.OnRezScript += RezScript;
 
             client.OnRequestTaskInventory += RequestTaskInventory;
@@ -1452,8 +1454,8 @@ namespace OpenSim.Region.Environment.Scenes
                 {
                     m_innerScene.removeUserCount(true);
                     m_sceneGridService.LogOffUser(agentID, RegionInfo.RegionID, RegionInfo.RegionHandle,
-                                                avatar.AbsolutePosition.X, avatar.AbsolutePosition.Y,
-                                                avatar.AbsolutePosition.Z);
+                                                  avatar.AbsolutePosition.X, avatar.AbsolutePosition.Y,
+                                                  avatar.AbsolutePosition.Z);
                     List<ulong> childknownRegions = new List<ulong>();
                     List<ulong> ckn = avatar.GetKnownRegionList();
                     for (int i = 0; i < ckn.Count; i++)
@@ -1477,16 +1479,16 @@ namespace OpenSim.Region.Environment.Scenes
             }
             m_eventManager.TriggerOnRemovePresence(agentID);
             Broadcast(delegate(IClientAPI client)
+                      {
+                          try
+                          {
+                              client.SendKillObject(avatar.RegionHandle, avatar.LocalId);
+                          }
+                          catch (System.NullReferenceException)
                           {
-                              try
-                              {
-                                  client.SendKillObject(avatar.RegionHandle, avatar.LocalId);
-                              }
-                              catch (System.NullReferenceException)
-                              {
-                                  //We can safely ignore null reference exceptions.  It means the avatar are dead and cleaned up anyway.
-                              }
-                          });
+                              //We can safely ignore null reference exceptions.  It means the avatar are dead and cleaned up anyway.
+                          }
+                      });
 
             ForEachScenePresence(
                 delegate(ScenePresence presence) { presence.CoarseLocationChange(); });
@@ -1903,8 +1905,6 @@ namespace OpenSim.Region.Environment.Scenes
             }
         }
 
-
-
         #endregion
 
         #region Other Methods
@@ -2152,10 +2152,10 @@ namespace OpenSim.Region.Environment.Scenes
         {
 
             ClientManager.ForEachClient(delegate(IClientAPI controller)
-                    {
-                        controller.SendBlueBoxMessage(FromAvatarID, fromSessionID, FromAvatarName, Message);
-                    }
-            );
+                                        {
+                                            controller.SendBlueBoxMessage(FromAvatarID, fromSessionID, FromAvatarName, Message);
+                                        }
+                );
         }
 
         /// <summary>
@@ -2180,27 +2180,27 @@ namespace OpenSim.Region.Environment.Scenes
                     if (agentID == kickUserID)
                     {
                         ClientManager.ForEachClient(delegate(IClientAPI controller)
-                                                        {
-                                                            if (controller.AgentId != godID)
-                                                                controller.Kick(Helpers.FieldToUTF8String(reason));
+                                                    {
+                                                        if (controller.AgentId != godID)
+                                                            controller.Kick(Helpers.FieldToUTF8String(reason));
 
 
 
-                                                        }
+                                                    }
                             );
                         // This is a bit crude.   It seems the client will be null before it actually stops the thread
                         // The thread will kill itself eventually :/
                         // Is there another way to make sure *all* clients get this 'inter region' message?
                         ClientManager.ForEachClient(delegate(IClientAPI controller)
-                                                        {
-                                                            ScenePresence p = GetScenePresence(controller.AgentId);
-                                                            bool childagent = !p.Equals(null) && p.IsChildAgent;
-                                                            if (controller.AgentId != godID && !childagent)
+                                                    {
+                                                        ScenePresence p = GetScenePresence(controller.AgentId);
+                                                        bool childagent = !p.Equals(null) && p.IsChildAgent;
+                                                        if (controller.AgentId != godID && !childagent)
                                                             // Do we really want to kick the initiator of this madness?
-                                                            {
-                                                                controller.Close(true);
-                                                            }
+                                                        {
+                                                            controller.Close(true);
                                                         }
+                                                    }
                             );
                     }
                     else
diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs
index b00b678..050bf95 100644
--- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs
@@ -115,12 +115,11 @@ namespace OpenSim.Region.Environment.Scenes
 
         protected AvatarAppearance m_appearance;
 
+        //neighbouring regions we have enabled a child agent in
         private readonly List<ulong> m_knownChildRegions = new List<ulong>();
-                                     //neighbouring regions we have enabled a child agent in
 
         private SignificantClientMovement handlerSignificantClientMovement = null; //OnSignificantClientMovement;
 
-
         /// <summary>
         /// Implemented Control Flags
         /// </summary>
@@ -1447,12 +1446,12 @@ namespace OpenSim.Region.Environment.Scenes
             m_perfMonMS=System.Environment.TickCount;
 
             m_scene.ForEachScenePresence(delegate(ScenePresence scenePresence)
+                                         {
+                                             if (scenePresence.UUID != UUID)
                                              {
-                                                 if (scenePresence.UUID != UUID)
-                                                 {
-                                                     m_appearance.SendAppearanceToOtherAgent(scenePresence);
-                                                 }
-                                             });
+                                                 m_appearance.SendAppearanceToOtherAgent(scenePresence);
+                                             }
+                                         });
             m_scene.AddAgentTime(System.Environment.TickCount - m_perfMonMS);
         }
 
@@ -1780,9 +1779,9 @@ namespace OpenSim.Region.Environment.Scenes
             }
 
             [SecurityPermission(SecurityAction.LinkDemand,
-                Flags = SecurityPermissionFlag.SerializationFormatter)]
+                                Flags = SecurityPermissionFlag.SerializationFormatter)]
             public virtual void GetObjectData(
-                            SerializationInfo info, StreamingContext context)
+                SerializationInfo info, StreamingContext context)
             {
                 if (info == null)
                 {
@@ -1792,7 +1791,6 @@ namespace OpenSim.Region.Environment.Scenes
                 info.AddValue("FullID", FullID.UUID);
                 info.AddValue("LastFullUpdateTime", LastFullUpdateTime);
                 info.AddValue("LastTerseUpdateTime", LastTerseUpdateTime);
-
             }
         }
 
@@ -1929,9 +1927,9 @@ namespace OpenSim.Region.Environment.Scenes
 
             m_requestedSitOffset
                 = new LLVector3(
-                        (float)info.GetValue("m_requestedSitOffset.X", typeof(float)),
-                        (float)info.GetValue("m_requestedSitOffset.Y", typeof(float)),
-                        (float)info.GetValue("m_requestedSitOffset.Z", typeof(float)));
+                    (float)info.GetValue("m_requestedSitOffset.X", typeof(float)),
+                    (float)info.GetValue("m_requestedSitOffset.Y", typeof(float)),
+                    (float)info.GetValue("m_requestedSitOffset.Z", typeof(float)));
 
             m_sitAvatarHeight = (float)info.GetValue("m_sitAvatarHeight", typeof(float));
             m_godlevel = (float)info.GetValue("m_godlevel", typeof(float));
@@ -1939,10 +1937,10 @@ namespace OpenSim.Region.Environment.Scenes
 
             m_bodyRot
                 = new Quaternion(
-                        (float)info.GetValue("m_bodyRot.w", typeof(float)),
-                        (float)info.GetValue("m_bodyRot.x", typeof(float)),
-                        (float)info.GetValue("m_bodyRot.y", typeof(float)),
-                        (float)info.GetValue("m_bodyRot.z", typeof(float)));
+                    (float)info.GetValue("m_bodyRot.w", typeof(float)),
+                    (float)info.GetValue("m_bodyRot.x", typeof(float)),
+                    (float)info.GetValue("m_bodyRot.y", typeof(float)),
+                    (float)info.GetValue("m_bodyRot.z", typeof(float)));
 
             IsRestrictedToRegion = (bool)info.GetValue("IsRestrictedToRegion", typeof(bool));
             m_newForce = (bool)info.GetValue("m_newForce", typeof(bool));
@@ -1964,33 +1962,33 @@ namespace OpenSim.Region.Environment.Scenes
 
             lastPhysPos
                 = new LLVector3(
-                        (float)info.GetValue("lastPhysPos.X", typeof(float)),
-                        (float)info.GetValue("lastPhysPos.Y", typeof(float)),
-                        (float)info.GetValue("lastPhysPos.Z", typeof(float)));
+                    (float)info.GetValue("lastPhysPos.X", typeof(float)),
+                    (float)info.GetValue("lastPhysPos.Y", typeof(float)),
+                    (float)info.GetValue("lastPhysPos.Z", typeof(float)));
 
             m_CameraCenter
                 = new Vector3(
-                        (float)info.GetValue("m_CameraCenter.X", typeof(float)),
-                        (float)info.GetValue("m_CameraCenter.Y", typeof(float)),
-                        (float)info.GetValue("m_CameraCenter.Z", typeof(float)));
+                    (float)info.GetValue("m_CameraCenter.X", typeof(float)),
+                    (float)info.GetValue("m_CameraCenter.Y", typeof(float)),
+                    (float)info.GetValue("m_CameraCenter.Z", typeof(float)));
 
             m_CameraAtAxis
                 = new Vector3(
-                        (float)info.GetValue("m_CameraAtAxis.X", typeof(float)),
-                        (float)info.GetValue("m_CameraAtAxis.Y", typeof(float)),
-                        (float)info.GetValue("m_CameraAtAxis.Z", typeof(float)));
+                    (float)info.GetValue("m_CameraAtAxis.X", typeof(float)),
+                    (float)info.GetValue("m_CameraAtAxis.Y", typeof(float)),
+                    (float)info.GetValue("m_CameraAtAxis.Z", typeof(float)));
 
             m_CameraLeftAxis
                 = new Vector3(
-                        (float)info.GetValue("m_CameraLeftAxis.X", typeof(float)),
-                        (float)info.GetValue("m_CameraLeftAxis.Y", typeof(float)),
-                        (float)info.GetValue("m_CameraLeftAxis.Z", typeof(float)));
+                    (float)info.GetValue("m_CameraLeftAxis.X", typeof(float)),
+                    (float)info.GetValue("m_CameraLeftAxis.Y", typeof(float)),
+                    (float)info.GetValue("m_CameraLeftAxis.Z", typeof(float)));
 
             m_CameraUpAxis
                 = new Vector3(
-                        (float)info.GetValue("m_CameraUpAxis.X", typeof(float)),
-                        (float)info.GetValue("m_CameraUpAxis.Y", typeof(float)),
-                        (float)info.GetValue("m_CameraUpAxis.Z", typeof(float)));
+                    (float)info.GetValue("m_CameraUpAxis.X", typeof(float)),
+                    (float)info.GetValue("m_CameraUpAxis.Y", typeof(float)),
+                    (float)info.GetValue("m_CameraUpAxis.Z", typeof(float)));
 
             m_DrawDistance = (float)info.GetValue("m_DrawDistance", typeof(float));
             m_appearance = (AvatarAppearance)info.GetValue("m_appearance", typeof(AvatarAppearance));
@@ -1998,9 +1996,9 @@ namespace OpenSim.Region.Environment.Scenes
 
             posLastSignificantMove
                 = new LLVector3(
-                        (float)info.GetValue("posLastSignificantMove.X", typeof(float)),
-                        (float)info.GetValue("posLastSignificantMove.Y", typeof(float)),
-                        (float)info.GetValue("posLastSignificantMove.Z", typeof(float)));
+                    (float)info.GetValue("posLastSignificantMove.X", typeof(float)),
+                    (float)info.GetValue("posLastSignificantMove.Y", typeof(float)),
+                    (float)info.GetValue("posLastSignificantMove.Z", typeof(float)));
 
             // m_partsUpdateQueue = (UpdateQueue)info.GetValue("m_partsUpdateQueue", typeof(UpdateQueue));
 
@@ -2018,41 +2016,41 @@ namespace OpenSim.Region.Environment.Scenes
             m_lastname = (string)info.GetValue("m_lastname", typeof(string));
             m_allowMovement = (bool)info.GetValue("m_allowMovement", typeof(bool));
             m_parentPosition = new LLVector3((float)info.GetValue("m_parentPosition.X", typeof(float)),
-                                            (float)info.GetValue("m_parentPosition.Y", typeof(float)),
-                                            (float)info.GetValue("m_parentPosition.Z", typeof(float)));
+                                             (float)info.GetValue("m_parentPosition.Y", typeof(float)),
+                                             (float)info.GetValue("m_parentPosition.Z", typeof(float)));
 
             m_isChildAgent = (bool)info.GetValue("m_isChildAgent", typeof(bool));
             m_parentID = (uint)info.GetValue("m_parentID", typeof(uint));
 
 // for OpenSim_v0.5
             currentParcelUUID = new LLUUID((Guid)info.GetValue("currentParcelUUID", typeof(Guid)));
-			
+
             lastKnownAllowedPosition
                 = new Vector3(
-                        (float)info.GetValue("lastKnownAllowedPosition.X", typeof(float)),
-                        (float)info.GetValue("lastKnownAllowedPosition.Y", typeof(float)),
-                        (float)info.GetValue("lastKnownAllowedPosition.Z", typeof(float)));
-			
+                    (float)info.GetValue("lastKnownAllowedPosition.X", typeof(float)),
+                    (float)info.GetValue("lastKnownAllowedPosition.Y", typeof(float)),
+                    (float)info.GetValue("lastKnownAllowedPosition.Z", typeof(float)));
+            
             sentMessageAboutRestrictedParcelFlyingDown = (bool)info.GetValue("sentMessageAboutRestrictedParcelFlyingDown", typeof(bool));
-			
+
             m_LastChildAgentUpdatePosition
                 = new LLVector3(
-                        (float)info.GetValue("m_LastChildAgentUpdatePosition.X", typeof(float)),
-                        (float)info.GetValue("m_LastChildAgentUpdatePosition.Y", typeof(float)),
-                        (float)info.GetValue("m_LastChildAgentUpdatePosition.Z", typeof(float)));
-			
+                    (float)info.GetValue("m_LastChildAgentUpdatePosition.X", typeof(float)),
+                    (float)info.GetValue("m_LastChildAgentUpdatePosition.Y", typeof(float)),
+                    (float)info.GetValue("m_LastChildAgentUpdatePosition.Z", typeof(float)));
+            
             m_perfMonMS = (int)info.GetValue("m_perfMonMS", typeof(int));
             m_AgentControlFlags = (uint)info.GetValue("m_AgentControlFlags", typeof(uint));
-			
+
             m_headrotation
                 = new LLQuaternion(
-                        (float)info.GetValue("m_headrotation.W", typeof(float)),
-                        (float)info.GetValue("m_headrotation.X", typeof(float)),
-                        (float)info.GetValue("m_headrotation.Y", typeof(float)),
-                        (float)info.GetValue("m_headrotation.Z", typeof(float)));
-			
+                    (float)info.GetValue("m_headrotation.W", typeof(float)),
+                    (float)info.GetValue("m_headrotation.X", typeof(float)),
+                    (float)info.GetValue("m_headrotation.Y", typeof(float)),
+                    (float)info.GetValue("m_headrotation.Z", typeof(float)));
+
             m_state = (byte)info.GetValue("m_state", typeof(byte));
-			
+
             List<Guid> knownPrimUUID_work = (List<Guid>)info.GetValue("m_knownPrimUUID", typeof(List<Guid>));
 
             foreach (Guid id in knownPrimUUID_work)
@@ -2064,9 +2062,9 @@ namespace OpenSim.Region.Environment.Scenes
         }
 
         [SecurityPermission(SecurityAction.LinkDemand,
-            Flags = SecurityPermissionFlag.SerializationFormatter)]
+                            Flags = SecurityPermissionFlag.SerializationFormatter)]
         public override void GetObjectData(
-                        SerializationInfo info, StreamingContext context)
+            SerializationInfo info, StreamingContext context)
         {
             if (info == null)
             {
@@ -2196,17 +2194,17 @@ namespace OpenSim.Region.Environment.Scenes
             info.AddValue("m_LastChildAgentUpdatePosition.X", m_LastChildAgentUpdatePosition.X);
             info.AddValue("m_LastChildAgentUpdatePosition.Y", m_LastChildAgentUpdatePosition.Y);
             info.AddValue("m_LastChildAgentUpdatePosition.Z", m_LastChildAgentUpdatePosition.Z);
-			
+
             info.AddValue("m_perfMonMS", m_perfMonMS);
             info.AddValue("m_AgentControlFlags", m_AgentControlFlags);
-			
+
             info.AddValue("m_headrotation.W", m_headrotation.W);
             info.AddValue("m_headrotation.X", m_headrotation.X);
             info.AddValue("m_headrotation.Y", m_headrotation.Y);
             info.AddValue("m_headrotation.Z", m_headrotation.Z);
-			
+
             info.AddValue("m_state", m_state);
-			
+
             List<Guid> knownPrimUUID_work = new List<Guid>();
 
             foreach (LLUUID id in m_knownPrimUUID)
@@ -2215,6 +2213,6 @@ namespace OpenSim.Region.Environment.Scenes
             }
 
             info.AddValue("m_knownPrimUUID", knownPrimUUID_work);
-		}
+        }
     }
 }
diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands_Interface.cs b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands_Interface.cs
index fcc8519..fd2bd15 100644
--- a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands_Interface.cs
+++ b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands_Interface.cs
@@ -636,15 +636,15 @@ namespace OpenSim.Region.ScriptEngine.Common
         //OpenSim functions
         string osSetDynamicTextureURL(string dynamicID, string contentType, string url, string extraParams, int timer);
         string osSetDynamicTextureURLBlend(string dynamicID, string contentType, string url, string extraParams,
-                                             int timer, int alpha);
+                                           int timer, int alpha);
         string osSetDynamicTextureData(string dynamicID, string contentType, string data, string extraParams, int timer);
         string osSetDynamicTextureDataBlend(string dynamicID, string contentType, string data, string extraParams,
-                                         int timer, int alpha);
+                                            int timer, int alpha);
         double osTerrainGetHeight(int x, int y);
         int osTerrainSetHeight(int x, int y, double val);
         int osRegionRestart(double seconds);
         void osRegionNotice(string msg);
-	    bool osConsoleCommand(string Command);
+        bool osConsoleCommand(string Command);
         void osSetParcelMediaURL(string url);
         void osSetPrimFloatOnWater(int floatYN);
 
-- 
cgit v1.1