From ad1df330063ff2786b1ed8aae65f0198285ccd9c Mon Sep 17 00:00:00 2001 From: Melanie Date: Thu, 7 Jun 2012 23:41:10 +0200 Subject: Further limit the amount of avatar collisions that will actually trigger sounds. They are distracting. --- OpenSim/Region/Framework/Scenes/CollisionSounds.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/Framework/Scenes') diff --git a/OpenSim/Region/Framework/Scenes/CollisionSounds.cs b/OpenSim/Region/Framework/Scenes/CollisionSounds.cs index a95e75a..3ec3cf7 100644 --- a/OpenSim/Region/Framework/Scenes/CollisionSounds.cs +++ b/OpenSim/Region/Framework/Scenes/CollisionSounds.cs @@ -266,9 +266,11 @@ namespace OpenSim.Region.Framework.Scenes else { volume = Math.Abs(colInfo.relativeVel); - if (volume < 0.2f) + // Most noral collisions (running into walls, stairs) + // should never be heard. + if (volume < 2.0f) continue; - m_log.DebugFormat("Collision speed was {0}", volume); +// m_log.DebugFormat("Collision speed was {0}", volume); // Cap to 0.2 times volume because climbing stairs should not be noisy // Also changed scaling -- cgit v1.1 From 038acc39bef922b823964ac43083b24c129fca81 Mon Sep 17 00:00:00 2001 From: Melanie Date: Fri, 8 Jun 2012 00:09:30 +0200 Subject: Cut off collision sounds with avatar at 3.2. This makes most walkig collisions with walls and stairs silent. Falls from greater height and running into things will still be heard. a CollisionSound defined for the object will override this so one can still script a soccer ball with sounds. --- OpenSim/Region/Framework/Scenes/CollisionSounds.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Region/Framework/Scenes') diff --git a/OpenSim/Region/Framework/Scenes/CollisionSounds.cs b/OpenSim/Region/Framework/Scenes/CollisionSounds.cs index 3ec3cf7..075724e 100644 --- a/OpenSim/Region/Framework/Scenes/CollisionSounds.cs +++ b/OpenSim/Region/Framework/Scenes/CollisionSounds.cs @@ -268,7 +268,7 @@ namespace OpenSim.Region.Framework.Scenes volume = Math.Abs(colInfo.relativeVel); // Most noral collisions (running into walls, stairs) // should never be heard. - if (volume < 2.0f) + if (volume < 3.2f) continue; // m_log.DebugFormat("Collision speed was {0}", volume); -- cgit v1.1 From 2d98d6354ce04b655e8d9062a209f5af1565c78c Mon Sep 17 00:00:00 2001 From: Melanie Date: Fri, 8 Jun 2012 15:14:38 +0200 Subject: Add a frame based watchdog function to keyframed motion --- OpenSim/Region/Framework/Scenes/KeyframeMotion.cs | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'OpenSim/Region/Framework/Scenes') diff --git a/OpenSim/Region/Framework/Scenes/KeyframeMotion.cs b/OpenSim/Region/Framework/Scenes/KeyframeMotion.cs index b7b0d27..0219d9c 100644 --- a/OpenSim/Region/Framework/Scenes/KeyframeMotion.cs +++ b/OpenSim/Region/Framework/Scenes/KeyframeMotion.cs @@ -64,6 +64,10 @@ namespace OpenSim.Region.Framework.Scenes [NonSerialized()] protected Timer m_timer = new Timer(); + [NonSerialized()] + protected bool m_frameHooked; + [NonSerialized()] + protected int frameCount = 0; [NonSerialized()] private SceneObjectGroup m_group; @@ -162,6 +166,22 @@ namespace OpenSim.Region.Framework.Scenes if (m_keyframes.Length > 0) m_timer.Start(); m_running = true; + if (!m_frameHooked) + { + m_group.Scene.EventManager.OnFrame += OnFrame; + m_frameHooked = true; + } + } + + private void OnFrame() + { + frameCount++; + if (frameCount >= 30) + { + frameCount = 0; + if (m_running) + Start(); + } } public void Stop() -- cgit v1.1 From 1eee525c886f55e63a1d6ebf6ba224a73d4c4178 Mon Sep 17 00:00:00 2001 From: Melanie Date: Fri, 8 Jun 2012 16:54:47 +0200 Subject: Revert "Add a frame based watchdog function to keyframed motion" This reverts commit 2d98d6354ce04b655e8d9062a209f5af1565c78c. --- OpenSim/Region/Framework/Scenes/KeyframeMotion.cs | 20 -------------------- 1 file changed, 20 deletions(-) (limited to 'OpenSim/Region/Framework/Scenes') diff --git a/OpenSim/Region/Framework/Scenes/KeyframeMotion.cs b/OpenSim/Region/Framework/Scenes/KeyframeMotion.cs index 0219d9c..b7b0d27 100644 --- a/OpenSim/Region/Framework/Scenes/KeyframeMotion.cs +++ b/OpenSim/Region/Framework/Scenes/KeyframeMotion.cs @@ -64,10 +64,6 @@ namespace OpenSim.Region.Framework.Scenes [NonSerialized()] protected Timer m_timer = new Timer(); - [NonSerialized()] - protected bool m_frameHooked; - [NonSerialized()] - protected int frameCount = 0; [NonSerialized()] private SceneObjectGroup m_group; @@ -166,22 +162,6 @@ namespace OpenSim.Region.Framework.Scenes if (m_keyframes.Length > 0) m_timer.Start(); m_running = true; - if (!m_frameHooked) - { - m_group.Scene.EventManager.OnFrame += OnFrame; - m_frameHooked = true; - } - } - - private void OnFrame() - { - frameCount++; - if (frameCount >= 30) - { - frameCount = 0; - if (m_running) - Start(); - } } public void Stop() -- cgit v1.1 From efff5a7c0da115c21720b879194ed87dc63def2d Mon Sep 17 00:00:00 2001 From: Melanie Date: Fri, 8 Jun 2012 18:25:36 +0200 Subject: Fix a corner case where checking for region corssing may cross an avatar back if it's pending to be sat onto a vehicle that is in the process of crossing. --- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/Framework/Scenes') diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 2b1fb3d..a810de2 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -1051,6 +1051,7 @@ namespace OpenSim.Region.Framework.Scenes IsChildAgent = true; m_scene.SwapRootAgentCount(true); RemoveFromPhysicalScene(); + ParentID = 0; // Child agents can't be sitting // FIXME: Set RegionHandle to the region handle of the scene this agent is moving into @@ -2091,6 +2092,9 @@ namespace OpenSim.Region.Framework.Scenes public void HandleAgentRequestSit(IClientAPI remoteClient, UUID agentID, UUID targetID, Vector3 offset) { + if (IsChildAgent) + return; + if (ParentID != 0) { StandUp(); @@ -2893,8 +2897,9 @@ namespace OpenSim.Region.Framework.Scenes // If we don't have a PhysActor, we can't cross anyway // Also don't do this while sat, sitting avatars cross with the - // object they sit on. - if (ParentID != 0 || PhysicsActor == null) + // object they sit on. ParentUUID denoted a pending sit, don't + // interfere with it. + if (ParentID != 0 || PhysicsActor == null || ParentUUID != UUID.Zero) return; if (!IsInTransit) -- cgit v1.1