diff options
author | Justin Clark-Casey (justincc) | 2012-03-21 23:57:39 +0000 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2012-03-21 23:57:39 +0000 |
commit | 1a8769e6eff0eab750a528f27d127637edbd292b (patch) | |
tree | eb488868d606738222ff47493c82fb19a903cb42 /OpenSim/Region/Framework/Scenes/Animation/AnimationSet.cs | |
parent | If "debug scene updates true" then print out to log when a garbage collection... (diff) | |
download | opensim-SC-1a8769e6eff0eab750a528f27d127637edbd292b.zip opensim-SC-1a8769e6eff0eab750a528f27d127637edbd292b.tar.gz opensim-SC-1a8769e6eff0eab750a528f27d127637edbd292b.tar.bz2 opensim-SC-1a8769e6eff0eab750a528f27d127637edbd292b.tar.xz |
Instead of loading default avatar animations in both SLUtil and AvatarAnimations, load just in AvatarAnimations instead.
This lets us remove the dependency of OpenSim.Framework.dll on data/avataranimations.xml, which is not necessary for ROBUST.
This commit also takes care of the odd situation where animations are stored and used internally with uppercase names (e.g. "STAND")
but scripts refer to them with lowercase names (e.g. "sit").
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Animation/AnimationSet.cs | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Animation/AnimationSet.cs b/OpenSim/Region/Framework/Scenes/Animation/AnimationSet.cs index 9176d3d..240a424 100644 --- a/OpenSim/Region/Framework/Scenes/Animation/AnimationSet.cs +++ b/OpenSim/Region/Framework/Scenes/Animation/AnimationSet.cs | |||
@@ -27,8 +27,10 @@ | |||
27 | 27 | ||
28 | using System; | 28 | using System; |
29 | using System.Collections.Generic; | 29 | using System.Collections.Generic; |
30 | using OpenSim.Framework; | 30 | using System.Reflection; |
31 | using log4net; | ||
31 | using OpenMetaverse; | 32 | using OpenMetaverse; |
33 | using OpenSim.Framework; | ||
32 | 34 | ||
33 | using Animation = OpenSim.Framework.Animation; | 35 | using Animation = OpenSim.Framework.Animation; |
34 | 36 | ||
@@ -37,7 +39,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation | |||
37 | [Serializable] | 39 | [Serializable] |
38 | public class AnimationSet | 40 | public class AnimationSet |
39 | { | 41 | { |
40 | public static AvatarAnimations Animations = new AvatarAnimations(); | 42 | // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
41 | 43 | ||
42 | private OpenSim.Framework.Animation m_defaultAnimation = new OpenSim.Framework.Animation(); | 44 | private OpenSim.Framework.Animation m_defaultAnimation = new OpenSim.Framework.Animation(); |
43 | private List<OpenSim.Framework.Animation> m_animations = new List<OpenSim.Framework.Animation>(); | 45 | private List<OpenSim.Framework.Animation> m_animations = new List<OpenSim.Framework.Animation>(); |
@@ -132,9 +134,13 @@ namespace OpenSim.Region.Framework.Scenes.Animation | |||
132 | /// </summary> | 134 | /// </summary> |
133 | public bool TrySetDefaultAnimation(string anim, int sequenceNum, UUID objectID) | 135 | public bool TrySetDefaultAnimation(string anim, int sequenceNum, UUID objectID) |
134 | { | 136 | { |
135 | if (Animations.AnimsUUID.ContainsKey(anim)) | 137 | // m_log.DebugFormat( |
138 | // "[ANIMATION SET]: Setting default animation {0}, sequence number {1}, object id {2}", | ||
139 | // anim, sequenceNum, objectID); | ||
140 | |||
141 | if (AvatarAnimations.AnimsUUID.ContainsKey(anim)) | ||
136 | { | 142 | { |
137 | return SetDefaultAnimation(Animations.AnimsUUID[anim], sequenceNum, objectID); | 143 | return SetDefaultAnimation(AvatarAnimations.AnimsUUID[anim], sequenceNum, objectID); |
138 | } | 144 | } |
139 | return false; | 145 | return false; |
140 | } | 146 | } |