aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/ScenePresence.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/ScenePresence.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs46
1 files changed, 30 insertions, 16 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index fed541f..df6c97a 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -1049,7 +1049,6 @@ namespace OpenSim.Region.Framework.Scenes
1049 } 1049 }
1050 1050
1051 m_controllingClient.MoveAgentIntoRegion(m_regionInfo, AbsolutePosition, look); 1051 m_controllingClient.MoveAgentIntoRegion(m_regionInfo, AbsolutePosition, look);
1052
1053 SendInitialData(); 1052 SendInitialData();
1054 1053
1055 } 1054 }
@@ -1760,11 +1759,10 @@ namespace OpenSim.Region.Framework.Scenes
1760 return; 1759 return;
1761 1760
1762 if (m_animations.Add(animID, m_controllingClient.NextAnimationSequenceNumber, objectID)) 1761 if (m_animations.Add(animID, m_controllingClient.NextAnimationSequenceNumber, objectID))
1763 {
1764 SendAnimPack(); 1762 SendAnimPack();
1765 }
1766 } 1763 }
1767 1764
1765 // Called from scripts
1768 public void AddAnimation(string name, UUID objectID) 1766 public void AddAnimation(string name, UUID objectID)
1769 { 1767 {
1770 if (m_isChildAgent) 1768 if (m_isChildAgent)
@@ -1783,11 +1781,10 @@ namespace OpenSim.Region.Framework.Scenes
1783 return; 1781 return;
1784 1782
1785 if (m_animations.Remove(animID)) 1783 if (m_animations.Remove(animID))
1786 {
1787 SendAnimPack(); 1784 SendAnimPack();
1788 }
1789 } 1785 }
1790 1786
1787 // Called from scripts
1791 public void RemoveAnimation(string name) 1788 public void RemoveAnimation(string name)
1792 { 1789 {
1793 if (m_isChildAgent) 1790 if (m_isChildAgent)
@@ -2152,6 +2149,8 @@ namespace OpenSim.Region.Framework.Scenes
2152 } 2149 }
2153 m_scene.AddAgentUpdates(avatars.Count); 2150 m_scene.AddAgentUpdates(avatars.Count);
2154 m_scene.AddAgentTime(System.Environment.TickCount - m_perfMonMS); 2151 m_scene.AddAgentTime(System.Environment.TickCount - m_perfMonMS);
2152
2153 //SendAnimPack();
2155 } 2154 }
2156 2155
2157 public void SendFullUpdateToAllClients() 2156 public void SendFullUpdateToAllClients()
@@ -2256,7 +2255,6 @@ namespace OpenSim.Region.Framework.Scenes
2256 m_scene.CommsManager.AvatarService.UpdateUserAppearance(m_controllingClient.AgentId, m_appearance); 2255 m_scene.CommsManager.AvatarService.UpdateUserAppearance(m_controllingClient.AgentId, m_appearance);
2257 2256
2258 SendAppearanceToAllOtherAgents(); 2257 SendAppearanceToAllOtherAgents();
2259 //SendWearables();
2260 if (!m_startAnimationSet) 2258 if (!m_startAnimationSet)
2261 { 2259 {
2262 UpdateMovementAnimations(); 2260 UpdateMovementAnimations();
@@ -2312,7 +2310,7 @@ namespace OpenSim.Region.Framework.Scenes
2312 /// </summary> 2310 /// </summary>
2313 public void SendAnimPack() 2311 public void SendAnimPack()
2314 { 2312 {
2315 //m_log.Debug("Sending animation pack"); 2313 //m_log.Debug("Sending animation pack to all");
2316 2314
2317 if (m_isChildAgent) 2315 if (m_isChildAgent)
2318 return; 2316 return;
@@ -2326,6 +2324,7 @@ namespace OpenSim.Region.Framework.Scenes
2326 SendAnimPack(animIDs, sequenceNums, objectIDs); 2324 SendAnimPack(animIDs, sequenceNums, objectIDs);
2327 } 2325 }
2328 2326
2327
2329 #endregion 2328 #endregion
2330 2329
2331 #region Significant Movement Method 2330 #region Significant Movement Method
@@ -2454,6 +2453,13 @@ namespace OpenSim.Region.Framework.Scenes
2454 AddToPhysicalScene(false); // not exactly false 2453 AddToPhysicalScene(false); // not exactly false
2455 } 2454 }
2456 2455
2456 public void Reset()
2457 {
2458 // Put the child agent back at the center
2459 AbsolutePosition = new Vector3(128, 128, 70);
2460 m_animations.Clear();
2461 }
2462
2457 /// <summary> 2463 /// <summary>
2458 /// Computes which child agents to close when the scene presence moves to another region. 2464 /// Computes which child agents to close when the scene presence moves to another region.
2459 /// Removes those regions from m_knownRegions. 2465 /// Removes those regions from m_knownRegions.
@@ -2618,11 +2624,6 @@ namespace OpenSim.Region.Framework.Scenes
2618 2624
2619 cAgent.AlwaysRun = m_setAlwaysRun; 2625 cAgent.AlwaysRun = m_setAlwaysRun;
2620 2626
2621 //cAgent.GroupID = ??
2622 // Groups???
2623
2624 // Animations???
2625
2626 try 2627 try
2627 { 2628 {
2628 int i = 0; 2629 int i = 0;
@@ -2644,10 +2645,16 @@ namespace OpenSim.Region.Framework.Scenes
2644 { 2645 {
2645 m_log.Warn("[SCENE PRESENCE]: exception in CopyTo " + e.Message); 2646 m_log.Warn("[SCENE PRESENCE]: exception in CopyTo " + e.Message);
2646 } 2647 }
2647 //cAgent.GroupID = ??
2648 // Groups???
2649 2648
2650 // Animations??? 2649 // Animations
2650 try
2651 {
2652 cAgent.Anims = m_animations.ToArray();
2653 }
2654 catch { }
2655
2656 // cAgent.GroupID = ??
2657 // Groups???
2651 2658
2652 } 2659 }
2653 2660
@@ -2697,10 +2704,17 @@ namespace OpenSim.Region.Framework.Scenes
2697 m_log.Warn("[SCENE PRESENCE]: exception in CopyFrom " + e.Message); 2704 m_log.Warn("[SCENE PRESENCE]: exception in CopyFrom " + e.Message);
2698 } 2705 }
2699 2706
2707 // Animations
2708 try
2709 {
2710 m_animations.Clear();
2711 m_animations.FromArray(cAgent.Anims);
2712 }
2713 catch { }
2714
2700 //cAgent.GroupID = ?? 2715 //cAgent.GroupID = ??
2701 //Groups??? 2716 //Groups???
2702 2717
2703 // Animations???
2704 2718
2705 } 2719 }
2706 2720