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