From 56edbe9b60e5ed5f1388e2d1d4d2a0d82cdeaf6d Mon Sep 17 00:00:00 2001 From: nlin Date: Fri, 18 Sep 2009 11:26:52 +0900 Subject: Alternate algorithm for fixing avatar capsule tilt (Mantis #2905) Eliminate dynamic capsule wobble. Instead introduce a small, fixed tilt, and allow the tilt to rotate with the avatar while moving; the tilt always faces away from the direction of avatar movement. The rotation while moving should eliminate direction-dependent behavior (e.g. only being able to climb on top of prims from certain directions). Falling animation is still too frequently invoked. Ideally the tilt should be completely eliminated, but doing so currently causes the avatar to fall through the terrain. --- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Region/Framework/Scenes/ScenePresence.cs') diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 23fe2d3..6772f75 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -2269,7 +2269,7 @@ namespace OpenSim.Region.Framework.Scenes { //Record the time we enter this state so we know whether to "land" or not m_animPersistUntil = DateTime.Now.Ticks; - return "FALLDOWN"; + return "FALLDOWN"; // this falling animation is invoked too frequently when capsule tilt correction is used - why? } } } -- cgit v1.1 From 5757afe7665543e8b3ed4a322a7d6e095dafcdb3 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sat, 26 Sep 2009 07:48:21 -0700 Subject: First pass at the heart surgery for grid services. Compiles and runs minimally. A few bugs to catch now. --- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/Framework/Scenes/ScenePresence.cs') diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 6772f75..286b7ca 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -36,6 +36,7 @@ using OpenSim.Framework.Communications.Cache; using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Scenes.Types; using OpenSim.Region.Physics.Manager; +using GridRegion = OpenSim.Services.Interfaces.GridRegion; namespace OpenSim.Region.Framework.Scenes { @@ -2934,8 +2935,9 @@ namespace OpenSim.Region.Framework.Scenes else if (dir > 3 && dir < 7) // Heading Sout neighboury--; - ulong neighbourHandle = Utils.UIntsToLong((uint)(neighbourx * Constants.RegionSize), (uint)(neighboury * Constants.RegionSize)); - SimpleRegionInfo neighbourRegion = m_scene.RequestNeighbouringRegionInfo(neighbourHandle); + int x = (int)(neighbourx * Constants.RegionSize); + int y = (int)(neighboury * Constants.RegionSize); + GridRegion neighbourRegion = m_scene.GridService.GetRegionByPosition(m_scene.RegionInfo.ScopeID, x, y); if (neighbourRegion == null) { -- cgit v1.1 From ee205e7e812e170f670e690a4e0fa9caa652f226 Mon Sep 17 00:00:00 2001 From: Jeff Ames Date: Thu, 1 Oct 2009 01:00:09 +0900 Subject: Formatting cleanup. --- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'OpenSim/Region/Framework/Scenes/ScenePresence.cs') diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 286b7ca..0e1b8d9 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -776,7 +776,7 @@ namespace OpenSim.Region.Framework.Scenes // Moved this from SendInitialData to ensure that m_appearance is initialized // before the inventory is processed in MakeRootAgent. This fixes a race condition // related to the handling of attachments - //m_scene.GetAvatarAppearance(m_controllingClient, out m_appearance); + //m_scene.GetAvatarAppearance(m_controllingClient, out m_appearance); if (m_scene.TestBorderCross(pos, Cardinals.E)) { Border crossedBorder = m_scene.GetCrossedBorder(pos, Cardinals.E); @@ -1235,7 +1235,7 @@ namespace OpenSim.Region.Framework.Scenes if ((flags & (uint) AgentManager.ControlFlags.AGENT_CONTROL_STAND_UP) != 0) { StandUp(); - } + } // Check if Client has camera in 'follow cam' or 'build' mode. Vector3 camdif = (Vector3.One * m_bodyRot - Vector3.One * CameraRotation); @@ -1489,7 +1489,7 @@ namespace OpenSim.Region.Framework.Scenes { // m_log.DebugFormat("{0} {1}", update_movementflag, (update_rotation && DCFlagKeyPressed)); // m_log.DebugFormat( -// "In {0} adding velocity to {1} of {2}", m_scene.RegionInfo.RegionName, Name, agent_control_v3); +// "In {0} adding velocity to {1} of {2}", m_scene.RegionInfo.RegionName, Name, agent_control_v3); AddNewMovement(agent_control_v3, q); @@ -2306,7 +2306,7 @@ namespace OpenSim.Region.Framework.Scenes /// Rotate the avatar to the given rotation and apply a movement in the given relative vector /// /// The vector in which to move. This is relative to the rotation argument - /// The direction in which this avatar should now face. + /// The direction in which this avatar should now face. public void AddNewMovement(Vector3 vec, Quaternion rotation) { if (m_isChildAgent) @@ -2649,7 +2649,7 @@ namespace OpenSim.Region.Framework.Scenes /// Tell the client for this scene presence what items it should be wearing now /// public void SendWearables() - { + { ControllingClient.SendWearables(m_appearance.Wearables, m_appearance.Serial++); } @@ -3175,7 +3175,7 @@ namespace OpenSim.Region.Framework.Scenes else { wears[i++] = UUID.Zero; - wears[i++] = UUID.Zero; + wears[i++] = UUID.Zero; } } cAgent.Wearables = wears; @@ -3487,7 +3487,7 @@ namespace OpenSim.Region.Framework.Scenes public bool HasAttachments() { - return m_attachments.Count > 0; + return m_attachments.Count > 0; } public bool HasScriptedAttachments() -- cgit v1.1 From 606e831ff5337fb5e94dcebf9d6852bd4c434d4b Mon Sep 17 00:00:00 2001 From: Jeff Ames Date: Thu, 1 Oct 2009 09:38:36 +0900 Subject: Formatting cleanup. --- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Region/Framework/Scenes/ScenePresence.cs') diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 0e1b8d9..66fefa3 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -2313,7 +2313,7 @@ namespace OpenSim.Region.Framework.Scenes { m_log.Debug("DEBUG: AddNewMovement: child agent, Making root agent!"); - // we have to reset the user's child agent connections. + // we have to reset the user's child agent connections. // Likely, here they've lost the eventqueue for other regions so border // crossings will fail at this point unless we reset them. -- cgit v1.1