aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/Linden/UDP
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2012-03-09 23:57:24 +0000
committerJustin Clark-Casey (justincc)2012-03-09 23:57:24 +0000
commitbdc968f1fcd4008e9f2a6099a7d30edb075ca0f1 (patch)
tree7c2c45cc97fb1b2181605313ed50e5db9cd6ec0f /OpenSim/Region/ClientStack/Linden/UDP
parentMerge branch 'master' of melanie@opensimulator.org:/var/git/opensim (diff)
downloadopensim-SC_OLD-bdc968f1fcd4008e9f2a6099a7d30edb075ca0f1.zip
opensim-SC_OLD-bdc968f1fcd4008e9f2a6099a7d30edb075ca0f1.tar.gz
opensim-SC_OLD-bdc968f1fcd4008e9f2a6099a7d30edb075ca0f1.tar.bz2
opensim-SC_OLD-bdc968f1fcd4008e9f2a6099a7d30edb075ca0f1.tar.xz
Factor out common default animations code into SLUtil. LLClientView now makes use of the SLUtil copy via a method rather than each LLClientView loading a separate copy.
As per opensim-users mailing list discussion.
Diffstat (limited to 'OpenSim/Region/ClientStack/Linden/UDP')
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs27
1 files changed, 1 insertions, 26 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
index d98ff68..b388b10 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
@@ -317,7 +317,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
317 protected readonly UUID m_agentId; 317 protected readonly UUID m_agentId;
318 private readonly uint m_circuitCode; 318 private readonly uint m_circuitCode;
319 private readonly byte[] m_channelVersion = Utils.EmptyBytes; 319 private readonly byte[] m_channelVersion = Utils.EmptyBytes;
320 private readonly Dictionary<string, UUID> m_defaultAnimations = new Dictionary<string, UUID>();
321 private readonly IGroupsModule m_GroupsModule; 320 private readonly IGroupsModule m_GroupsModule;
322 321
323 private int m_cachedTextureSerial; 322 private int m_cachedTextureSerial;
@@ -452,10 +451,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
452 RegisterInterface<IClientChat>(this); 451 RegisterInterface<IClientChat>(this);
453 RegisterInterface<IClientIPEndpoint>(this); 452 RegisterInterface<IClientIPEndpoint>(this);
454 453
455 InitDefaultAnimations();
456
457 m_scene = scene; 454 m_scene = scene;
458
459 m_entityUpdates = new PriorityQueue(m_scene.Entities.Count); 455 m_entityUpdates = new PriorityQueue(m_scene.Entities.Count);
460 m_entityProps = new PriorityQueue(m_scene.Entities.Count); 456 m_entityProps = new PriorityQueue(m_scene.Entities.Count);
461 m_fullUpdateDataBlocksBuilder = new List<ObjectUpdatePacket.ObjectDataBlock>(); 457 m_fullUpdateDataBlocksBuilder = new List<ObjectUpdatePacket.ObjectDataBlock>();
@@ -11210,30 +11206,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
11210 OutPacket(scriptQuestion, ThrottleOutPacketType.Task); 11206 OutPacket(scriptQuestion, ThrottleOutPacketType.Task);
11211 } 11207 }
11212 11208
11213 private void InitDefaultAnimations()
11214 {
11215 using (XmlTextReader reader = new XmlTextReader("data/avataranimations.xml"))
11216 {
11217 XmlDocument doc = new XmlDocument();
11218 doc.Load(reader);
11219 if (doc.DocumentElement != null)
11220 foreach (XmlNode nod in doc.DocumentElement.ChildNodes)
11221 {
11222 if (nod.Attributes["name"] != null)
11223 {
11224 string name = nod.Attributes["name"].Value.ToLower();
11225 string id = nod.InnerText;
11226 m_defaultAnimations.Add(name, (UUID)id);
11227 }
11228 }
11229 }
11230 }
11231
11232 public UUID GetDefaultAnimation(string name) 11209 public UUID GetDefaultAnimation(string name)
11233 { 11210 {
11234 if (m_defaultAnimations.ContainsKey(name)) 11211 return SLUtil.GetDefaultAvatarAnimation(name);
11235 return m_defaultAnimations[name];
11236 return UUID.Zero;
11237 } 11212 }
11238 11213
11239 /// <summary> 11214 /// <summary>