diff options
author | BlueWall | 2012-03-21 20:34:51 -0400 |
---|---|---|
committer | BlueWall | 2012-03-21 20:34:51 -0400 |
commit | c98e3a6422be9a1fc8fef45a6ddb5ba7e37c5dda (patch) | |
tree | 3e88ccd53c6b19b0f9bed5345fda7ca5a1b34940 /OpenSim/Framework | |
parent | Fix typo (diff) | |
parent | Merge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff) | |
download | opensim-SC_OLD-c98e3a6422be9a1fc8fef45a6ddb5ba7e37c5dda.zip opensim-SC_OLD-c98e3a6422be9a1fc8fef45a6ddb5ba7e37c5dda.tar.gz opensim-SC_OLD-c98e3a6422be9a1fc8fef45a6ddb5ba7e37c5dda.tar.bz2 opensim-SC_OLD-c98e3a6422be9a1fc8fef45a6ddb5ba7e37c5dda.tar.xz |
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
Diffstat (limited to 'OpenSim/Framework')
-rw-r--r-- | OpenSim/Framework/IClientAPI.cs | 3 | ||||
-rw-r--r-- | OpenSim/Framework/SLUtil.cs | 50 |
2 files changed, 2 insertions, 51 deletions
diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs index c85e599..3f560d0 100644 --- a/OpenSim/Framework/IClientAPI.cs +++ b/OpenSim/Framework/IClientAPI.cs | |||
@@ -1215,10 +1215,9 @@ namespace OpenSim.Framework | |||
1215 | /// <param name="OrbitalPosition">The orbital position is given in radians, and must be "adjusted" for the linden client, see LLClientView</param> | 1215 | /// <param name="OrbitalPosition">The orbital position is given in radians, and must be "adjusted" for the linden client, see LLClientView</param> |
1216 | void SendSunPos(Vector3 sunPos, Vector3 sunVel, ulong CurrentTime, uint SecondsPerSunCycle, uint SecondsPerYear, | 1216 | void SendSunPos(Vector3 sunPos, Vector3 sunVel, ulong CurrentTime, uint SecondsPerSunCycle, uint SecondsPerYear, |
1217 | float OrbitalPosition); | 1217 | float OrbitalPosition); |
1218 | 1218 | ||
1219 | void SendViewerEffect(ViewerEffectPacket.EffectBlock[] effectBlocks); | 1219 | void SendViewerEffect(ViewerEffectPacket.EffectBlock[] effectBlocks); |
1220 | void SendViewerTime(int phase); | 1220 | void SendViewerTime(int phase); |
1221 | UUID GetDefaultAnimation(string name); | ||
1222 | 1221 | ||
1223 | void SendAvatarProperties(UUID avatarID, string aboutText, string bornOn, Byte[] charterMember, string flAbout, | 1222 | void SendAvatarProperties(UUID avatarID, string aboutText, string bornOn, Byte[] charterMember, string flAbout, |
1224 | uint flags, UUID flImageID, UUID imageID, string profileURL, UUID partnerID); | 1223 | uint flags, UUID flImageID, UUID imageID, string profileURL, UUID partnerID); |
diff --git a/OpenSim/Framework/SLUtil.cs b/OpenSim/Framework/SLUtil.cs index f9cb851..db4541e 100644 --- a/OpenSim/Framework/SLUtil.cs +++ b/OpenSim/Framework/SLUtil.cs | |||
@@ -27,6 +27,7 @@ | |||
27 | 27 | ||
28 | using System; | 28 | using System; |
29 | using System.Collections.Generic; | 29 | using System.Collections.Generic; |
30 | using System.IO; | ||
30 | using System.Reflection; | 31 | using System.Reflection; |
31 | using System.Xml; | 32 | using System.Xml; |
32 | using log4net; | 33 | using log4net; |
@@ -40,13 +41,6 @@ namespace OpenSim.Framework | |||
40 | 41 | ||
41 | #region SL / file extension / content-type conversions | 42 | #region SL / file extension / content-type conversions |
42 | 43 | ||
43 | public static Dictionary<string, UUID> DefaultAvatarAnimations = new Dictionary<string, UUID>(); | ||
44 | |||
45 | static SLUtil() | ||
46 | { | ||
47 | DefaultAvatarAnimations = LoadDefaultAvatarAnimations("data/avataranimations.xml"); | ||
48 | } | ||
49 | |||
50 | public static string SLAssetTypeToContentType(int assetType) | 44 | public static string SLAssetTypeToContentType(int assetType) |
51 | { | 45 | { |
52 | switch ((AssetType)assetType) | 46 | switch ((AssetType)assetType) |
@@ -382,47 +376,5 @@ namespace OpenSim.Framework | |||
382 | 376 | ||
383 | return output; | 377 | return output; |
384 | } | 378 | } |
385 | |||
386 | /// <summary> | ||
387 | /// Load the default SL avatar animations. | ||
388 | /// </summary> | ||
389 | /// <returns></returns> | ||
390 | public static Dictionary<string, UUID> LoadDefaultAvatarAnimations(string path) | ||
391 | { | ||
392 | Dictionary<string, UUID> animations = new Dictionary<string, UUID>(); | ||
393 | |||
394 | using (XmlTextReader reader = new XmlTextReader(path)) | ||
395 | { | ||
396 | XmlDocument doc = new XmlDocument(); | ||
397 | doc.Load(reader); | ||
398 | if (doc.DocumentElement != null) | ||
399 | { | ||
400 | foreach (XmlNode nod in doc.DocumentElement.ChildNodes) | ||
401 | { | ||
402 | if (nod.Attributes["name"] != null) | ||
403 | { | ||
404 | string name = nod.Attributes["name"].Value.ToLower(); | ||
405 | string id = nod.InnerText; | ||
406 | animations.Add(name, (UUID)id); | ||
407 | } | ||
408 | } | ||
409 | } | ||
410 | } | ||
411 | |||
412 | return animations; | ||
413 | } | ||
414 | |||
415 | /// <summary> | ||
416 | /// Get the default SL avatar animation with the given name. | ||
417 | /// </summary> | ||
418 | /// <param name="name"></param> | ||
419 | /// <returns></returns> | ||
420 | public static UUID GetDefaultAvatarAnimation(string name) | ||
421 | { | ||
422 | if (DefaultAvatarAnimations.ContainsKey(name)) | ||
423 | return DefaultAvatarAnimations[name]; | ||
424 | |||
425 | return UUID.Zero; | ||
426 | } | ||
427 | } | 379 | } |
428 | } \ No newline at end of file | 380 | } \ No newline at end of file |