Merge branch 'avination' into ubitwork
commit
5254c0de8f
|
@ -87,7 +87,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation
|
|||
{
|
||||
if (m_defaultAnimation.AnimID == animID)
|
||||
{
|
||||
ResetDefaultAnimation();
|
||||
m_defaultAnimation = new OpenSim.Framework.Animation(UUID.Zero, 1, UUID.Zero);
|
||||
}
|
||||
else if (HasAnimation(animID))
|
||||
{
|
||||
|
@ -149,19 +149,26 @@ namespace OpenSim.Region.Framework.Scenes.Animation
|
|||
{
|
||||
lock (m_animations)
|
||||
{
|
||||
animIDs = new UUID[m_animations.Count + 1];
|
||||
sequenceNums = new int[m_animations.Count + 1];
|
||||
objectIDs = new UUID[m_animations.Count + 1];
|
||||
int defaultSize = 0;
|
||||
if (m_defaultAnimation.AnimID != UUID.Zero)
|
||||
defaultSize++;
|
||||
|
||||
animIDs = new UUID[m_animations.Count + defaultSize];
|
||||
sequenceNums = new int[m_animations.Count + defaultSize];
|
||||
objectIDs = new UUID[m_animations.Count + defaultSize];
|
||||
|
||||
if (m_defaultAnimation.AnimID != UUID.Zero)
|
||||
{
|
||||
animIDs[0] = m_defaultAnimation.AnimID;
|
||||
sequenceNums[0] = m_defaultAnimation.SequenceNum;
|
||||
objectIDs[0] = m_defaultAnimation.ObjectID;
|
||||
}
|
||||
|
||||
for (int i = 0; i < m_animations.Count; ++i)
|
||||
{
|
||||
animIDs[i + 1] = m_animations[i].AnimID;
|
||||
sequenceNums[i + 1] = m_animations[i].SequenceNum;
|
||||
objectIDs[i + 1] = m_animations[i].ObjectID;
|
||||
animIDs[i + defaultSize] = m_animations[i].AnimID;
|
||||
sequenceNums[i + defaultSize] = m_animations[i].SequenceNum;
|
||||
objectIDs[i + defaultSize] = m_animations[i].ObjectID;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -423,6 +423,9 @@ namespace OpenSim.Region.Framework.Scenes.Animation
|
|||
public void UpdateMovementAnimations()
|
||||
{
|
||||
lock (m_animations)
|
||||
{
|
||||
string newMovementAnimation = DetermineMovementAnimation();
|
||||
if (CurrentMovementAnimation != newMovementAnimation)
|
||||
{
|
||||
CurrentMovementAnimation = DetermineMovementAnimation();
|
||||
|
||||
|
@ -430,9 +433,12 @@ namespace OpenSim.Region.Framework.Scenes.Animation
|
|||
// "[SCENE PRESENCE ANIMATOR]: Determined animation {0} for {1} in UpdateMovementAnimations()",
|
||||
// CurrentMovementAnimation, m_scenePresence.Name);
|
||||
|
||||
// Only set it if it's actually changed, give a script
|
||||
// a chance to stop a default animation
|
||||
TrySetMovementAnimation(CurrentMovementAnimation);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public UUID[] GetAnimationArray()
|
||||
{
|
||||
|
|
|
@ -295,8 +295,8 @@ namespace OpenSim.Services.Connectors
|
|||
bool success = false;
|
||||
try
|
||||
{
|
||||
AsynchronousRestObjectRequester.MakeRequest<int, AssetBase>("GET", uri, 0,
|
||||
delegate(AssetBase a)
|
||||
AssetBase a = SynchronousRestObjectRequester.MakeRequest<int, AssetBase>("GET", uri, 0, 30);
|
||||
if (a != null)
|
||||
{
|
||||
if (m_Cache != null)
|
||||
m_Cache.Cache(a);
|
||||
|
@ -308,13 +308,18 @@ namespace OpenSim.Services.Connectors
|
|||
m_AssetHandlers.Remove(id);
|
||||
}
|
||||
foreach (AssetRetrievedEx h in handlers)
|
||||
{
|
||||
Util.FireAndForget(x =>
|
||||
{
|
||||
h.Invoke(a);
|
||||
});
|
||||
}
|
||||
if (handlers != null)
|
||||
handlers.Clear();
|
||||
}, 30);
|
||||
|
||||
success = true;
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (!success)
|
||||
|
|
Loading…
Reference in New Issue