From f1795fd9b043fc32e87a5f611ba795122f3fbaef Mon Sep 17 00:00:00 2001 From: diva Date: Wed, 18 Feb 2009 21:28:54 +0000 Subject: [PATCH] Stops animations on Teleports, to conform with what the viewer does. --- .../Scenes/Hypergrid/HGSceneCommunicationService.cs | 3 +++ OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs | 3 +++ OpenSim/Region/Framework/Scenes/ScenePresence.cs | 5 +++++ 3 files changed, 11 insertions(+) diff --git a/OpenSim/Region/Framework/Scenes/Hypergrid/HGSceneCommunicationService.cs b/OpenSim/Region/Framework/Scenes/Hypergrid/HGSceneCommunicationService.cs index f75ea8eb99..0faeef186e 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 9060bf21d7..827182937a 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 fc883dbfc8..62aae2cc51 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(); }