From f19816aeb91a5d31cb07fc7fb0f4419e2aad90be Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 29 Oct 2010 21:38:26 +0100 Subject: Add number of ms it takes to complete UseCircuitCode packet handling to log for diagnostics --- OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs index cb298fd..161e8c2 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs @@ -615,8 +615,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP // UseCircuitCode handling if (packet.Type == PacketType.UseCircuitCode) - { - m_log.Debug("[LLUDPSERVER]: Handling UseCircuitCode packet from " + buffer.RemoteEndPoint); + { object[] array = new object[] { buffer, packet }; if (m_asyncPacketHandling) @@ -827,9 +826,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP private void HandleUseCircuitCode(object o) { + DateTime startTime = DateTime.Now; object[] array = (object[])o; UDPPacketBuffer buffer = (UDPPacketBuffer)array[0]; UseCircuitCodePacket packet = (UseCircuitCodePacket)array[1]; + + m_log.DebugFormat("[LLUDPSERVER]: Handling UseCircuitCode request from {0}", buffer.RemoteEndPoint); IPEndPoint remoteEndPoint = (IPEndPoint)buffer.RemoteEndPoint; @@ -838,6 +840,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP // Acknowledge the UseCircuitCode packet SendAckImmediate(remoteEndPoint, packet.Header.Sequence); + + m_log.DebugFormat( + "[LLUDPSERVER]: Handling UseCircuitCode request from {0} took {1}ms", + buffer.RemoteEndPoint, (DateTime.Now - startTime).Milliseconds); } private void SendAckImmediate(IPEndPoint remoteEndpoint, uint sequenceNumber) -- cgit v1.1 From bcd784b3167d3be18ad803e89ae0e4afa74da068 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 29 Oct 2010 21:49:26 +0100 Subject: for now, comment out some older or redundant log debug lines to make diagnostics easier --- .../CoreModules/ServiceConnectorsOut/GridUser/ActivityDetector.cs | 4 ++-- .../CoreModules/ServiceConnectorsOut/Presence/PresenceDetector.cs | 4 ++-- OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/GridUser/ActivityDetector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/GridUser/ActivityDetector.cs index a64f785..6543845 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/GridUser/ActivityDetector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/GridUser/ActivityDetector.cs @@ -1,4 +1,4 @@ -/* +/* * Copyright (c) Contributors, http://opensimulator.org/ * See CONTRIBUTORS.TXT for a full list of copyright holders. * @@ -65,7 +65,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.GridUser public void OnMakeRootAgent(ScenePresence sp) { - m_log.DebugFormat("[ACTIVITY DETECTOR]: Detected root presence {0} in {1}", sp.UUID, sp.Scene.RegionInfo.RegionName); +// m_log.DebugFormat("[ACTIVITY DETECTOR]: Detected root presence {0} in {1}", sp.UUID, sp.Scene.RegionInfo.RegionName); m_GridUserService.SetLastPosition(sp.UUID.ToString(), UUID.Zero, sp.Scene.RegionInfo.RegionID, sp.AbsolutePosition, sp.Lookat); } diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/PresenceDetector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/PresenceDetector.cs index 62b8278..fa5b873 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/PresenceDetector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/PresenceDetector.cs @@ -1,4 +1,4 @@ -/* +/* * Copyright (c) Contributors, http://opensimulator.org/ * See CONTRIBUTORS.TXT for a full list of copyright holders. * @@ -71,7 +71,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Presence public void OnMakeRootAgent(ScenePresence sp) { - m_log.DebugFormat("[PRESENCE DETECTOR]: Detected root presence {0} in {1}", sp.UUID, sp.Scene.RegionInfo.RegionName); +// m_log.DebugFormat("[PRESENCE DETECTOR]: Detected root presence {0} in {1}", sp.UUID, sp.Scene.RegionInfo.RegionName); m_PresenceService.ReportAgent(sp.ControllingClient.SessionId, sp.Scene.RegionInfo.RegionID); } diff --git a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs index a182eea..3e478b0 100644 --- a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs +++ b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs @@ -324,7 +324,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap if (threadrunning) return; threadrunning = true; - m_log.Debug("[WORLD MAP]: Starting remote MapItem request thread"); +// m_log.Debug("[WORLD MAP]: Starting remote MapItem request thread"); Watchdog.StartThread(process, "MapItemRequestThread", ThreadPriority.BelowNormal, true); } -- cgit v1.1 From 25e19ba7e9ff4a080728178babe4fb1ef33b8d5d Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 29 Oct 2010 23:03:11 +0100 Subject: add timing report to CompleteScenePresence for diagnostic purposes --- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 13d9964..03aa8cf 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -1085,7 +1085,11 @@ namespace OpenSim.Region.Framework.Scenes /// public void CompleteMovement(IClientAPI client) { - //m_log.Debug("[SCENE PRESENCE]: CompleteMovement"); + DateTime startTime = DateTime.Now; + + m_log.DebugFormat( + "[SCENE PRESENCE]: Completing movement of {0} into region {1}", + client.Name, Scene.RegionInfo.RegionName); Vector3 look = Velocity; if ((look.X == 0) && (look.Y == 0) && (look.Z == 0)) @@ -1134,6 +1138,9 @@ namespace OpenSim.Region.Framework.Scenes friendsModule.SendFriendsOnlineIfNeeded(ControllingClient); } + m_log.DebugFormat( + "[SCENE PRESENCE]: Completing movement of {0} into region {1} took {2}ms", + client.Name, Scene.RegionInfo.RegionName, (DateTime.Now - startTime).Milliseconds); } /// -- cgit v1.1 From e66ec432afccb90ae400041e2428b26ad108d373 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 29 Oct 2010 23:45:10 +0100 Subject: Rationalize the logging messages from the merged appearance branch, commenting out most of them as per Mic --- .../Avatar/AvatarFactory/AvatarFactoryModule.cs | 47 +++++++++------------- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 10 ++--- 2 files changed, 23 insertions(+), 34 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs index bfbbcf8..e2755c8 100644 --- a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs @@ -117,7 +117,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory ScenePresence sp = m_scene.GetScenePresence(client.AgentId); if (sp == null) { - m_log.WarnFormat("[AVFACTORY] SetAppearance unable to find presence for {0}",client.AgentId); + m_log.WarnFormat("[AVATAR FACTORY MODULE]: SetAppearance unable to find presence for {0}", client.AgentId); return false; } @@ -147,14 +147,12 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory /// public void SetAppearance(IClientAPI client, Primitive.TextureEntry textureEntry, byte[] visualParams) { -// DEBUG ON - m_log.WarnFormat("[AVFACTORY] SetAppearance for {0}",client.AgentId); -// DEBUG OFF +// m_log.WarnFormat("[AVATAR FACTORY MODULE]: SetAppearance for {0}",client.AgentId); ScenePresence sp = m_scene.GetScenePresence(client.AgentId); if (sp == null) { - m_log.WarnFormat("[AVFACTORY] SetAppearance unable to find presence for {0}",client.AgentId); + m_log.WarnFormat("[AVATAR FACTORY MODULE]: SetAppearance unable to find presence for {0}",client.AgentId); return; } @@ -212,8 +210,8 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory { if (m_scene.AssetService.Get(textureID.ToString()) == null) { - m_log.WarnFormat("[AVFACTORY]: Missing baked texture {0} ({1}) for avatar {2}", - textureID,idx,client.Name); + m_log.WarnFormat("[AVATAR FACTORY MODULE]: Missing baked texture {0} ({1}) for avatar {2}", + textureID, idx, client.Name); return false; } return true; @@ -223,9 +221,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory public void QueueAppearanceSend(UUID agentid) { -// DEBUG ON - m_log.WarnFormat("[AVFACTORY] Queue appearance send for {0}",agentid); -// DEBUG OFF +// m_log.WarnFormat("[AVATAR FACTORY MODULE]: Queue appearance send for {0}",agentid); // 100 nanoseconds (ticks) we should wait long timestamp = DateTime.Now.Ticks + Convert.ToInt64(m_sendtime * 10000000); @@ -238,9 +234,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory public void QueueAppearanceSave(UUID agentid) { -// DEBUG ON - m_log.WarnFormat("[AVFACTORY] Queue appearance save for {0}",agentid); -// DEBUG OFF +// m_log.WarnFormat("[AVATAR FACTORY MODULE]: Queue appearance save for {0}",agentid); // 100 nanoseconds (ticks) we should wait long timestamp = DateTime.Now.Ticks + Convert.ToInt64(m_savetime * 10000000); @@ -256,13 +250,11 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory ScenePresence sp = m_scene.GetScenePresence(agentid); if (sp == null) { - m_log.WarnFormat("[AVFACTORY] Agent {0} no longer in the scene",agentid); + m_log.WarnFormat("[AVATAR FACTORY MODULE]: Agent {0} no longer in the scene", agentid); return; } -// DEBUG ON - m_log.WarnFormat("[AVFACTORY] Handle appearance send for {0}",agentid); -// DEBUG OFF +// m_log.WarnFormat("[AVATAR FACTORY MODULE]: Handle appearance send for {0}", agentid); // Send the appearance to everyone in the scene sp.SendAppearanceToAllOtherAgents(); @@ -288,7 +280,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory ScenePresence sp = m_scene.GetScenePresence(agentid); if (sp == null) { - m_log.WarnFormat("[AVFACTORY] Agent {0} no longer in the scene",agentid); + m_log.WarnFormat("[AVATAR FACTORY MODULE]: Agent {0} no longer in the scene", agentid); return; } @@ -339,13 +331,12 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory ScenePresence sp = m_scene.GetScenePresence(client.AgentId); if (sp == null) { - m_log.WarnFormat("[AVFACTORY] SendWearables unable to find presence for {0}",client.AgentId); + m_log.WarnFormat("[AVATAR FACTORY MODULE]: SendWearables unable to find presence for {0}", client.AgentId); return; } - -// DEBUG ON - m_log.WarnFormat("[AVFACTORY]: Received request for wearables of {0}", client.AgentId); -// DEBUG OFF + +// m_log.WarnFormat("[AVATAR FACTORY MODULE]: Received request for wearables of {0}", client.AgentId); + client.SendWearables(sp.Appearance.Wearables,sp.Appearance.Serial++); } @@ -359,13 +350,11 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory ScenePresence sp = m_scene.GetScenePresence(client.AgentId); if (sp == null) { - m_log.WarnFormat("[AVFACTORY] AvatarIsWearing unable to find presence for {0}",client.AgentId); + m_log.WarnFormat("[AVATAR FACTORY MODULE]: AvatarIsWearing unable to find presence for {0}", client.AgentId); return; } -// DEBUG ON - m_log.WarnFormat("[AVFACTORY]: AvatarIsWearing called for {0}",client.AgentId); -// DEBUG OFF +// m_log.WarnFormat("[AVATAR FACTORY MODULE]: AvatarIsWearing called for {0}",client.AgentId); AvatarAppearance avatAppearance = new AvatarAppearance(sp.Appearance); @@ -409,7 +398,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory else { m_log.ErrorFormat( - "[AVFACTORY]: Can't find inventory item {0} for {1}, setting to default", + "[AVATAR FACTORY MODULE]: Can't find inventory item {0} for {1}, setting to default", appearance.Wearables[i].ItemID, (WearableType)i); appearance.Wearables[i].ItemID = UUID.Zero; @@ -420,7 +409,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory } else { - m_log.WarnFormat("[AVFACTORY]: user {0} has no inventory, appearance isn't going to work", userID); + m_log.WarnFormat("[AVATAR FACTORY MODULE]: user {0} has no inventory, appearance isn't going to work", userID); } } } diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 1fc3ed6..29cf0e5 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -2393,13 +2393,13 @@ namespace OpenSim.Region.Framework.Scenes if (LocalId == remoteAvatar.LocalId) { - m_log.WarnFormat("[SP] An agent is attempting to send data to itself; {0}",UUID); + m_log.WarnFormat("[SCENEPRESENCE]: An agent is attempting to send data to itself; {0}", UUID); return; } if (IsChildAgent) { - m_log.WarnFormat("[SCENEPRESENCE] A child agent is attempting to send out avatar data"); + m_log.WarnFormat("[SCENEPRESENCE]: A child agent is attempting to send out avatar data; {0}", UUID); return; } @@ -2482,14 +2482,14 @@ namespace OpenSim.Region.Framework.Scenes { if (m_scene.AvatarFactory.ValidateBakedTextureCache(m_controllingClient)) { - m_log.WarnFormat("[SP] baked textures are in the ache for {0}",Name); +// m_log.WarnFormat("[SCENEPRESENCE]: baked textures are in the cache for {0}", Name); m_controllingClient.SendAppearance( m_appearance.Owner,m_appearance.VisualParams,m_appearance.Texture.GetBytes()); } } else { - m_log.WarnFormat("[SP] AvatarFactory not set"); + m_log.WarnFormat("[SCENEPRESENCE]: AvatarFactory not set for {0}", Name); } SendInitialFullUpdateToAllClients(); @@ -2501,7 +2501,7 @@ namespace OpenSim.Region.Framework.Scenes public void SendAppearanceToAllOtherAgents() { // DEBUG ON - m_log.WarnFormat("[SP] Send appearance from {0} to all other agents",m_uuid); +// m_log.WarnFormat("[SCENEPRESENCE]: Send appearance from {0} to all other agents", m_uuid); // DEBUG OFF m_perfMonMS = Util.EnvironmentTickCount(); -- cgit v1.1 From 09705514ff7068f1c1b32a979cde1ae3654d9065 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 29 Oct 2010 23:52:25 +0100 Subject: tweak a few more scene presence logging messages for consistency --- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 29cf0e5..52e7462 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -2384,7 +2384,7 @@ namespace OpenSim.Region.Framework.Scenes if (remoteAvatar == null) return; - IClientAPI cl=remoteAvatar.ControllingClient; + IClientAPI cl = remoteAvatar.ControllingClient; if (cl == null) return; @@ -2393,7 +2393,7 @@ namespace OpenSim.Region.Framework.Scenes if (LocalId == remoteAvatar.LocalId) { - m_log.WarnFormat("[SCENEPRESENCE]: An agent is attempting to send data to itself; {0}", UUID); + m_log.WarnFormat("[SCENEPRESENCE]: An agent is attempting to send avatar data to itself; {0}", UUID); return; } @@ -2524,7 +2524,7 @@ namespace OpenSim.Region.Framework.Scenes { if (LocalId == avatar.LocalId) { - m_log.WarnFormat("[SP] An agent is attempting to send data to itself; {0}",UUID); + m_log.WarnFormat("[SCENE PRESENCE]: An agent is attempting to send appearance data to itself; {0}", UUID); return; } -- cgit v1.1 From 818ed2032aa4e6c0a9ede3598d64f0c7960135c4 Mon Sep 17 00:00:00 2001 From: Melanie Date: Sat, 30 Oct 2010 00:41:36 +0100 Subject: READ CAREFULLY!!! This is a BROKEN commit. It is UNTESTED and INCOMPLETE. It contains a major interface version bump and will NOT work with earlier grid services. This is preliminary work that will lead to layers support. Rest appearance services are commented out completely, they will have to be adapted by someone who actually uses them. Remote admin is working, but has no layers support. There is no layers support in the database. Login likely won't work. You have been warned. --- .../Region/ClientStack/LindenUDP/LLClientView.cs | 21 +++++++++++++++------ .../Avatar/AvatarFactory/AvatarFactoryModule.cs | 15 +++++---------- 2 files changed, 20 insertions(+), 16 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index 14f923d..d7458b7 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs @@ -3387,20 +3387,29 @@ namespace OpenSim.Region.ClientStack.LindenUDP aw.AgentData.SerialNum = (uint)serial; aw.AgentData.SessionID = m_sessionId; + int count = 0; + for (int i = 0; i < wearables.Length; i++) + count += wearables[i].Count; + // TODO: don't create new blocks if recycling an old packet - aw.WearableData = new AgentWearablesUpdatePacket.WearableDataBlock[13]; + aw.WearableData = new AgentWearablesUpdatePacket.WearableDataBlock[count]; AgentWearablesUpdatePacket.WearableDataBlock awb; + int idx = 0; for (int i = 0; i < wearables.Length; i++) { - awb = new AgentWearablesUpdatePacket.WearableDataBlock(); - awb.WearableType = (byte)i; - awb.AssetID = wearables[i].AssetID; - awb.ItemID = wearables[i].ItemID; - aw.WearableData[i] = awb; + for (int j = 0; j < wearables[i].Count; j++) + { + awb = new AgentWearablesUpdatePacket.WearableDataBlock(); + awb.WearableType = (byte)i; + awb.AssetID = wearables[i][j].AssetID; + awb.ItemID = wearables[i][j].ItemID; + aw.WearableData[idx] = awb; + idx++; // m_log.DebugFormat( // "[APPEARANCE]: Sending wearable item/asset {0} {1} (index {2}) for {3}", // awb.ItemID, awb.AssetID, i, Name); + } } OutPacket(aw, ThrottleOutPacketType.Task); diff --git a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs index bfbbcf8..4d27ea4 100644 --- a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs @@ -393,27 +393,22 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory { for (int i = 0; i < AvatarWearable.MAX_WEARABLES; i++) { - if (appearance.Wearables[i].ItemID == UUID.Zero) + for (int j = 0 ; j < appearance.Wearables[j].Count ; j ++ ) { - appearance.Wearables[i].AssetID = UUID.Zero; - } - else - { - InventoryItemBase baseItem = new InventoryItemBase(appearance.Wearables[i].ItemID, userID); + InventoryItemBase baseItem = new InventoryItemBase(appearance.Wearables[i][j].ItemID, userID); baseItem = invService.GetItem(baseItem); if (baseItem != null) { - appearance.Wearables[i].AssetID = baseItem.AssetID; + appearance.Wearables[i].Add(appearance.Wearables[i][j].ItemID, baseItem.AssetID); } else { m_log.ErrorFormat( "[AVFACTORY]: Can't find inventory item {0} for {1}, setting to default", - appearance.Wearables[i].ItemID, (WearableType)i); + appearance.Wearables[i][j].ItemID, (WearableType)i); - appearance.Wearables[i].ItemID = UUID.Zero; - appearance.Wearables[i].AssetID = UUID.Zero; + appearance.Wearables[i].RemoveItem(appearance.Wearables[i][j].ItemID); } } } -- cgit v1.1 From ade71c9ed7ce45b4acb1456df457fe94ad46bd23 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Sat, 30 Oct 2010 01:32:56 +0100 Subject: Change level of some logging messages, turning some info into arguably more appropriate debug to reduce console spam when log level is info --- .../Framework/EntityTransfer/EntityTransferModule.cs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs index 38fff1c..485e05a 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs @@ -193,10 +193,11 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer GridRegion finalDestination = GetFinalDestination(reg); if (finalDestination == null) { - m_log.DebugFormat("[ENTITY TRANSFER MODULE]: Final destination is having problems. Unable to teleport agent."); + m_log.WarnFormat("[ENTITY TRANSFER MODULE]: Final destination is having problems. Unable to teleport agent."); sp.ControllingClient.SendTeleportFailed("Problem at destination"); return; } + m_log.DebugFormat("[ENTITY TRANSFER MODULE]: Final destination is x={0} y={1} uuid={2}", finalDestination.RegionLocX / Constants.RegionSize, finalDestination.RegionLocY / Constants.RegionSize, finalDestination.RegionID); @@ -240,7 +241,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer } catch (Exception e) { - m_log.DebugFormat("[ENTITY TRANSFER MODULE]: Exception on teleport: {0}\n{1}", e.Message, e.StackTrace); + m_log.WarnFormat("[ENTITY TRANSFER MODULE]: Exception on teleport: {0}\n{1}", e.Message, e.StackTrace); sp.ControllingClient.SendTeleportFailed("Internal error"); } } @@ -421,7 +422,6 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer m_log.DebugFormat( "[ENTITY TRANSFER MODULE]: Sending new CAPS seed url {0} to client {1}", capsPath, sp.UUID); - if (eq != null) { eq.TeleportFinishEvent(destinationHandle, 13, endPoint, @@ -581,6 +581,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer client.SendTeleportFailed("Your home region could not be found."); return; } + m_log.DebugFormat("[ENTITY TRANSFER MODULE]: User's home region is {0} {1} ({2}-{3})", regionInfo.RegionName, regionInfo.RegionID, regionInfo.RegionLocX / Constants.RegionSize, regionInfo.RegionLocY / Constants.RegionSize); @@ -1188,7 +1189,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer Utils.LongToUInts(reg.RegionHandle, out x, out y); x = x / Constants.RegionSize; y = y / Constants.RegionSize; - m_log.Info("[ENTITY TRANSFER MODULE]: Starting to inform client about neighbour " + x + ", " + y + "(" + endPoint.ToString() + ")"); + m_log.Debug("[ENTITY TRANSFER MODULE]: Starting to inform client about neighbour " + x + ", " + y + "(" + endPoint.ToString() + ")"); string capsPath = "http://" + reg.ExternalHostName + ":" + reg.HttpPort + "/CAPS/" + a.CapsPath + "0000/"; @@ -1224,7 +1225,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer // TODO: make Event Queue disablable! } - m_log.Info("[ENTITY TRANSFER MODULE]: Completed inform client about neighbour " + endPoint.ToString()); + m_log.Debug("[ENTITY TRANSFER MODULE]: Completed inform client about neighbour " + endPoint.ToString()); } -- cgit v1.1 From 343c89465891234be94da33719dcbdd903993a42 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Sat, 30 Oct 2010 01:35:12 +0100 Subject: Set async_packet_handling = true by default Setting this to true avoids a 500ms or so client freeze when the LLUDP server thread is taken up with processing a UseCircuitCode packet synchronously. Extensive testing on Wright Plaza appeared to show no bad effects and this seems to reduce login lag considerably. Of course, a lot of login lag is still coming from other sources. --- OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs index 161e8c2..821f679 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs @@ -183,7 +183,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP IConfig config = configSource.Configs["ClientStack.LindenUDP"]; if (config != null) { - m_asyncPacketHandling = config.GetBoolean("async_packet_handling", false); + m_asyncPacketHandling = config.GetBoolean("async_packet_handling", true); m_recvBufferSize = config.GetInt("client_socket_rcvbuf_size", 0); sceneThrottleBps = config.GetInt("scene_throttle_max_bps", 0); -- cgit v1.1 From 45220a6954129a5cb7e162761008b51cb8cc01e4 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Sat, 30 Oct 2010 03:01:40 +0100 Subject: minor: remove some old commented out code --- .../Archiver/InventoryArchiveWriteRequest.cs | 22 ---------------------- 1 file changed, 22 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs index 9080e1c..d81703a 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs @@ -173,28 +173,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver InventoryCollection contents = m_scene.InventoryService.GetFolderContent(inventoryFolder.Owner, inventoryFolder.ID); - //List childFolders = inventoryFolder.RequestListOfFolderImpls(); - //List items = inventoryFolder.RequestListOfItems(); - - /* - Dictionary identicalFolderNames = new Dictionary(); - - foreach (InventoryFolderImpl folder in inventories) - { - if (!identicalFolderNames.ContainsKey(folder.Name)) - identicalFolderNames[folder.Name] = 0; - else - identicalFolderNames[folder.Name] = identicalFolderNames[folder.Name]++; - - int folderNameNumber = identicalFolderName[folder.Name]; - - SaveInvDir( - folder, - string.Format( - "{0}{1}{2}/", - path, ArchiveConstants.INVENTORY_NODE_NAME_COMPONENT_SEPARATOR, folderNameNumber)); - } - */ foreach (InventoryFolderBase childFolder in contents.Folders) { -- cgit v1.1 From 09bf9d5fca8e9c22f3a0f5660aa55eea316853b1 Mon Sep 17 00:00:00 2001 From: Teravus Ovares (Dan Olivares) Date: Sat, 30 Oct 2010 02:26:48 -0400 Subject: * AbsolutePosition.Get{} returns incorrect result for child prim so switch to using prim.GetWorldPosition() in the warp renderer. --- OpenSim/Region/CoreModules/World/Warp3DMap/MapImageModule.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/CoreModules/World/Warp3DMap/MapImageModule.cs b/OpenSim/Region/CoreModules/World/Warp3DMap/MapImageModule.cs index 00b506e..6eb57eb 100644 --- a/OpenSim/Region/CoreModules/World/Warp3DMap/MapImageModule.cs +++ b/OpenSim/Region/CoreModules/World/Warp3DMap/MapImageModule.cs @@ -355,7 +355,7 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap if (renderMesh == null) return; - warp_Vector primPos = ConvertVector(prim.AbsolutePosition); + warp_Vector primPos = ConvertVector(prim.GetWorldPosition()); warp_Quaternion primRot = ConvertQuaternion(prim.RotationOffset); warp_Matrix m = warp_Matrix.quaternionMatrix(primRot); -- cgit v1.1 From e98d8d500f5c0dda6e9ef8b9a0e1bddec8510d1d Mon Sep 17 00:00:00 2001 From: Melanie Date: Sat, 30 Oct 2010 19:06:47 +0100 Subject: Fix logins and avatar appearance. Contains a Migration. May contain nuts. This will cause visual params to be persisted along with worn items. With this, alpha and tattoo laters will be saved. Multiple layers MAY work, but not tested because I don't use Viewer 2. --- OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | 1 + .../Avatar/AvatarFactory/AvatarFactoryModule.cs | 15 ++++++++++----- 2 files changed, 11 insertions(+), 5 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index d7458b7..4aa19d1 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs @@ -5734,6 +5734,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP AvatarWearingArgs wearingArgs = new AvatarWearingArgs(); for (int i = 0; i < nowWearing.WearableData.Length; i++) { + m_log.DebugFormat("[XXX]: Wearable type {0} item {1}", nowWearing.WearableData[i].WearableType, nowWearing.WearableData[i].ItemID); AvatarWearingArgs.Wearable wearable = new AvatarWearingArgs.Wearable(nowWearing.WearableData[i].ItemID, nowWearing.WearableData[i].WearableType); diff --git a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs index 6cbd8bd..7f482cb 100644 --- a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs @@ -356,17 +356,16 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory // m_log.WarnFormat("[AVATAR FACTORY MODULE]: AvatarIsWearing called for {0}",client.AgentId); - AvatarAppearance avatAppearance = new AvatarAppearance(sp.Appearance); + AvatarAppearance avatAppearance = new AvatarAppearance(sp.Appearance, false); foreach (AvatarWearingArgs.Wearable wear in e.NowWearing) { if (wear.Type < AvatarWearable.MAX_WEARABLES) - { - AvatarWearable newWearable = new AvatarWearable(wear.ItemID,UUID.Zero); - avatAppearance.SetWearable(wear.Type, newWearable); - } + avatAppearance.Wearables[wear.Type].Add(wear.ItemID,UUID.Zero); } + avatAppearance.GetAssetsFrom(sp.Appearance); + // This could take awhile since it needs to pull inventory SetAppearanceAssets(sp.UUID, ref avatAppearance); @@ -384,6 +383,12 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory { for (int j = 0 ; j < appearance.Wearables[j].Count ; j ++ ) { + if (appearance.Wearables[i][j].ItemID == UUID.Zero) + continue; + + // Ignore ruth's assets + if (appearance.Wearables[i][j].ItemID == AvatarWearable.DefaultWearables[i][0].ItemID) + continue; InventoryItemBase baseItem = new InventoryItemBase(appearance.Wearables[i][j].ItemID, userID); baseItem = invService.GetItem(baseItem); -- cgit v1.1 From 623cee1ffc2f2362982242593652904691e80fce Mon Sep 17 00:00:00 2001 From: Melanie Date: Sat, 30 Oct 2010 19:17:52 +0100 Subject: Move physics actor creation to after SetHeight to try and prevent bowlegginess. Didn't work but is better this way anyway. --- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 52e7462..8defe68 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -858,17 +858,6 @@ namespace OpenSim.Region.Framework.Scenes } AbsolutePosition = pos; - AddToPhysicalScene(isFlying); - - if (m_forceFly) - { - m_physicsActor.Flying = true; - } - else if (m_flyDisabled) - { - m_physicsActor.Flying = false; - } - if (m_appearance != null) { if (m_appearance.AvatarHeight > 0) @@ -881,6 +870,17 @@ namespace OpenSim.Region.Framework.Scenes m_appearance = new AvatarAppearance(UUID); } + AddToPhysicalScene(isFlying); + + if (m_forceFly) + { + m_physicsActor.Flying = true; + } + else if (m_flyDisabled) + { + m_physicsActor.Flying = false; + } + // Don't send an animation pack here, since on a region crossing this will sometimes cause a flying // avatar to return to the standing position in mid-air. On login it looks like this is being sent // elsewhere anyway -- cgit v1.1 From f15f0ab59b3b05c9afd755a366eff07795964abe Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sun, 31 Oct 2010 12:11:30 -0700 Subject: Removed a couple of very verbose debug messages. --- .../Inventory/RemoteXInventoryServiceConnector.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteXInventoryServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteXInventoryServiceConnector.cs index 34205e3..bd01bb9 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteXInventoryServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteXInventoryServiceConnector.cs @@ -261,7 +261,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory public InventoryItemBase GetItem(InventoryItemBase item) { - m_log.DebugFormat("[XINVENTORY CONNECTOR]: GetItem {0}", item.ID); + //m_log.DebugFormat("[XINVENTORY CONNECTOR]: GetItem {0}", item.ID); if (item == null) return null; @@ -272,7 +272,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory public InventoryFolderBase GetFolder(InventoryFolderBase folder) { - m_log.DebugFormat("[XINVENTORY CONNECTOR]: GetFolder {0}", folder.ID); + //m_log.DebugFormat("[XINVENTORY CONNECTOR]: GetFolder {0}", folder.ID); if (folder == null) return null; -- cgit v1.1 From ed7959ddfbff413c18d1167eccda0d3436a26b8c Mon Sep 17 00:00:00 2001 From: dahlia Date: Tue, 2 Nov 2010 02:35:56 -0700 Subject: Thanks Snoopy for a patch that addresses Mantis #0005165: osSetDynamicTextureURL crashed region server Signed-off-by: dahlia --- .../Scripting/LoadImageURL/LoadImageURLModule.cs | 64 +++++++++++----------- 1 file changed, 32 insertions(+), 32 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/CoreModules/Scripting/LoadImageURL/LoadImageURLModule.cs b/OpenSim/Region/CoreModules/Scripting/LoadImageURL/LoadImageURLModule.cs index c23cea5..ed3e516 100644 --- a/OpenSim/Region/CoreModules/Scripting/LoadImageURL/LoadImageURLModule.cs +++ b/OpenSim/Region/CoreModules/Scripting/LoadImageURL/LoadImageURLModule.cs @@ -176,44 +176,44 @@ namespace OpenSim.Region.CoreModules.Scripting.LoadImageURL stream = response.GetResponseStream(); if (stream != null) { - Bitmap image = new Bitmap(stream); - Size newsize; - - // TODO: make this a bit less hard coded - if ((image.Height < 64) && (image.Width < 64)) - { - newsize = new Size(32, 32); - } - else if ((image.Height < 128) && (image.Width < 128)) - { - newsize = new Size(64, 64); - } - else if ((image.Height < 256) && (image.Width < 256)) - { - newsize = new Size(128, 128); - } - else if ((image.Height < 512 && image.Width < 512)) - { - newsize = new Size(256, 256); - } - else if ((image.Height < 1024 && image.Width < 1024)) - { - newsize = new Size(512, 512); - } - else - { - newsize = new Size(1024, 1024); - } - - Bitmap resize = new Bitmap(image, newsize); - try { + Bitmap image = new Bitmap(stream); + Size newsize; + + // TODO: make this a bit less hard coded + if ((image.Height < 64) && (image.Width < 64)) + { + newsize = new Size(32, 32); + } + else if ((image.Height < 128) && (image.Width < 128)) + { + newsize = new Size(64, 64); + } + else if ((image.Height < 256) && (image.Width < 256)) + { + newsize = new Size(128, 128); + } + else if ((image.Height < 512 && image.Width < 512)) + { + newsize = new Size(256, 256); + } + else if ((image.Height < 1024 && image.Width < 1024)) + { + newsize = new Size(512, 512); + } + else + { + newsize = new Size(1024, 1024); + } + + Bitmap resize = new Bitmap(image, newsize); + imageJ2000 = OpenJPEG.EncodeFromImage(resize, true); } catch (Exception) { - m_log.Error("[LOADIMAGEURLMODULE]: OpenJpeg Encode Failed. Empty byte data returned!"); + m_log.Error("[LOADIMAGEURLMODULE]: OpenJpeg Conversion Failed. Empty byte data returned!"); } } else -- cgit v1.1 From 9f5ab3b965b1a3324918b7b2267c24709d42919b Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Tue, 2 Nov 2010 12:05:24 -0700 Subject: Old deserialization can't deal with commas in flag fields. Making use of -version option on save oar command. Bumped archives version to 0.5; version < 0.5 generates flag fields without commas. Everything else is identical. --- OpenSim/Region/Application/OpenSim.cs | 5 +++-- .../World/Archiver/ArchiveWriteRequestExecution.cs | 7 ++----- .../World/Archiver/ArchiveWriteRequestPreparation.cs | 19 ++++++++----------- .../Scenes/Serialization/SceneObjectSerializer.cs | 20 +++++++++++++++++--- 4 files changed, 30 insertions(+), 21 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs index 7a0142f..f80cb34 100644 --- a/OpenSim/Region/Application/OpenSim.cs +++ b/OpenSim/Region/Application/OpenSim.cs @@ -264,9 +264,10 @@ namespace OpenSim LoadOar); m_console.Commands.AddCommand("region", false, "save oar", - "save oar []", + "save oar [-v|version=N] []", "Save a region's data to an OAR archive.", - "The OAR path must be a filesystem path." + "-v|version=N generates scene objects as per older versions of the serialization (e.g. -v=0)" + Environment.NewLine + + "The OAR path must be a filesystem path." + " If this is not given then the oar is saved to region.oar in the current directory.", SaveOar); diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestExecution.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestExecution.cs index c062833..f8a599a 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestExecution.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestExecution.cs @@ -137,16 +137,13 @@ namespace OpenSim.Region.CoreModules.World.Archiver m_log.InfoFormat("[ARCHIVER]: Added terrain information to archive."); - Dictionary serializationOptions = new Dictionary(); -// if (m_options.ContainsKey("version") && (string)m_options["version"] == "0") -// serializationOptions["old-guids"] = true; - + // Write out scene object metadata foreach (SceneObjectGroup sceneObject in m_sceneObjects) { //m_log.DebugFormat("[ARCHIVER]: Saving {0} {1}, {2}", entity.Name, entity.UUID, entity.GetType()); - string serializedObject = m_serialiser.SerializeGroupToXml2(sceneObject, serializationOptions); + string serializedObject = m_serialiser.SerializeGroupToXml2(sceneObject, m_options); m_archiveWriter.WriteFile(ArchiveHelpers.CreateObjectPath(sceneObject), serializedObject); } diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestPreparation.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestPreparation.cs index 3182079..0567a82 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestPreparation.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestPreparation.cs @@ -187,20 +187,17 @@ namespace OpenSim.Region.CoreModules.World.Archiver /// public static string Create0p2ControlFile(Dictionary options) { - int majorVersion = 0, minorVersion = 4; - - /* - if (options.ContainsKey("version") && (string)options["version"] == "0") - { - majorVersion = 0; - minorVersion = 3; - } - else + int majorVersion = 0, minorVersion = 5; + + if (options.ContainsKey("version")) { - majorVersion = 1; minorVersion = 0; + string[] parts = options["version"].ToString().Split('.'); + if (parts.Length >= 1) + majorVersion = Int32.Parse(parts[0]); + if (parts.Length >= 2) + minorVersion = Int32.Parse(parts[1]); } - */ m_log.InfoFormat("[ARCHIVER]: Creating version {0}.{1} OAR", majorVersion, minorVersion); // if (majorVersion == 1) diff --git a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs index e661ca9..7f37878 100644 --- a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs +++ b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs @@ -1135,7 +1135,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization writer.WriteElementString("GroupMask", sop.GroupMask.ToString()); writer.WriteElementString("EveryoneMask", sop.EveryoneMask.ToString()); writer.WriteElementString("NextOwnerMask", sop.NextOwnerMask.ToString()); - writer.WriteElementString("Flags", sop.Flags.ToString()); + WriteFlags(writer, "Flags", sop.Flags.ToString(), options); WriteUUID(writer, "CollisionSound", sop.CollisionSound, options); writer.WriteElementString("CollisionSoundVolume", sop.CollisionSoundVolume.ToString()); if (sop.MediaUrl != null) @@ -1188,6 +1188,20 @@ namespace OpenSim.Region.Framework.Scenes.Serialization } + static void WriteFlags(XmlTextWriter writer, string name, string flagsStr, Dictionary options) + { + // Older versions of serialization can't cope with commas + if (options.ContainsKey("version")) + { + float version = 0.5F; + float.TryParse(options["version"].ToString(), out version); + if (version < 0.5) + flagsStr = flagsStr.Replace(",", ""); + } + + writer.WriteElementString(name, flagsStr); + } + static void WriteTaskInventory(XmlTextWriter writer, TaskInventoryDictionary tinv, Dictionary options) { if (tinv.Count > 0) // otherwise skip this @@ -1275,8 +1289,8 @@ namespace OpenSim.Region.Framework.Scenes.Serialization writer.WriteElementString("ProfileHollow", shp.ProfileHollow.ToString()); writer.WriteElementString("State", shp.State.ToString()); - writer.WriteElementString("ProfileShape", shp.ProfileShape.ToString()); - writer.WriteElementString("HollowShape", shp.HollowShape.ToString()); + WriteFlags(writer, "ProfileShape", shp.ProfileShape.ToString(), options); + WriteFlags(writer, "HollowShape", shp.HollowShape.ToString(), options); WriteUUID(writer, "SculptTexture", shp.SculptTexture, options); writer.WriteElementString("SculptType", shp.SculptType.ToString()); -- cgit v1.1 From 78a0ed3ff919569b7f572ea3d713454c9a71fff0 Mon Sep 17 00:00:00 2001 From: Melanie Date: Tue, 2 Nov 2010 21:28:24 +0000 Subject: Fix sitting and standing up --- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 8defe68..d01cac2 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -872,6 +872,12 @@ namespace OpenSim.Region.Framework.Scenes AddToPhysicalScene(isFlying); + if (m_appearance != null) + { + if (m_appearance.AvatarHeight > 0) + SetHeight(m_appearance.AvatarHeight); + } + if (m_forceFly) { m_physicsActor.Flying = true; @@ -2391,11 +2397,14 @@ namespace OpenSim.Region.Framework.Scenes if (m_appearance.Texture == null) return; - if (LocalId == remoteAvatar.LocalId) - { - m_log.WarnFormat("[SCENEPRESENCE]: An agent is attempting to send avatar data to itself; {0}", UUID); - return; - } +// MT: This is needed for sit. It's legal to send it to oneself, and the name +// of the method is a misnomer +// +// if (LocalId == remoteAvatar.LocalId) +// { +// m_log.WarnFormat("[SCENEPRESENCE]: An agent is attempting to send avatar data to itself; {0}", UUID); +// return; +// } if (IsChildAgent) { -- cgit v1.1