From f1795fd9b043fc32e87a5f611ba795122f3fbaef Mon Sep 17 00:00:00 2001 From: diva Date: Wed, 18 Feb 2009 21:28:54 +0000 Subject: Stops animations on Teleports, to conform with what the viewer does. --- .../Region/Framework/Scenes/Hypergrid/HGSceneCommunicationService.cs | 3 +++ OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs | 3 +++ OpenSim/Region/Framework/Scenes/ScenePresence.cs | 5 +++++ 3 files changed, 11 insertions(+) (limited to 'OpenSim/Region/Framework') diff --git a/OpenSim/Region/Framework/Scenes/Hypergrid/HGSceneCommunicationService.cs b/OpenSim/Region/Framework/Scenes/Hypergrid/HGSceneCommunicationService.cs index f75ea8e..0faeef1 100644 --- a/OpenSim/Region/Framework/Scenes/Hypergrid/HGSceneCommunicationService.cs +++ b/OpenSim/Region/Framework/Scenes/Hypergrid/HGSceneCommunicationService.cs @@ -71,6 +71,9 @@ namespace OpenSim.Region.Framework.Scenes.Hypergrid IEventQueue eq = avatar.Scene.RequestModuleInterface(); + // Reset animations; the viewer does that in teleports. + avatar.ResetAnimations(); + if (regionHandle == m_regionInfo.RegionHandle) { // Teleport within the same region diff --git a/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs b/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs index 9060bf2..8271829 100644 --- a/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs +++ b/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs @@ -689,6 +689,9 @@ namespace OpenSim.Region.Framework.Scenes IEventQueue eq = avatar.Scene.RequestModuleInterface(); + // Reset animations; the viewer does that in teleports. + avatar.ResetAnimations(); + if (regionHandle == m_regionInfo.RegionHandle) { m_log.DebugFormat( diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index fc883db..62aae2c 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -2472,6 +2472,11 @@ namespace OpenSim.Region.Framework.Scenes { // Put the child agent back at the center AbsolutePosition = new Vector3(128, 128, 70); + ResetAnimations(); + } + + public void ResetAnimations() + { m_animations.Clear(); } -- cgit v1.1