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/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 ++++++++++--------- 5 files changed, 198 insertions(+), 194 deletions(-) (limited to 'OpenSim/Region/Environment') 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 // " :Nickname is already in use" + NotRegistered = 451, // ":You have not registered" + NicknameInUse = 433 // " :Nickname is already in use" } public enum Replies { - MotdStart = 375, // ":- Message of the day - " - Motd = 372, // ":- " - EndOfMotd = 376 // ":End of /MOTD command" + MotdStart = 375, // ":- Message of the day - " + Motd = 372, // ":- " + 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 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 textures = new List(); List bitImages = new List(); @@ -1048,7 +1049,6 @@ namespace OpenSim.Region.Environment.Scenes m_log.Info("[SCENE]: Loaded " + PrimsFromDB.Count.ToString() + " SceneObject(s)"); } - /// /// Returns a new unallocated primitive ID /// @@ -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 childknownRegions = new List(); List 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); + } + ); } /// @@ -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 m_knownChildRegions = new List(); - //neighbouring regions we have enabled a child agent in private SignificantClientMovement handlerSignificantClientMovement = null; //OnSignificantClientMovement; - /// /// Implemented Control Flags /// @@ -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 knownPrimUUID_work = (List)info.GetValue("m_knownPrimUUID", typeof(List)); 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 knownPrimUUID_work = new List(); foreach (LLUUID id in m_knownPrimUUID) @@ -2215,6 +2213,6 @@ namespace OpenSim.Region.Environment.Scenes } info.AddValue("m_knownPrimUUID", knownPrimUUID_work); - } + } } } -- cgit v1.1