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/Framework/Scenes') 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 --- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'OpenSim/Region/Framework/Scenes') 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/Framework/Scenes') 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 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/Framework/Scenes') 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 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. --- .../Scenes/Serialization/SceneObjectSerializer.cs | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region/Framework/Scenes') 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/Framework/Scenes') 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