mirror of
https://github.com/opensim/opensim.git
synced 2026-07-31 05:45:37 +08:00
Add "debug set set animations true|false" region console command.
Setting this logs extra information about animation add/remove, such as uuid and animation name Unfortunately cannot be done per client yet
This commit is contained in:
@@ -86,7 +86,10 @@ namespace OpenSim.Region.Framework.Scenes.Animation
|
||||
if (m_scenePresence.IsChildAgent)
|
||||
return;
|
||||
|
||||
// m_log.DebugFormat("[SCENE PRESENCE ANIMATOR]: Adding animation {0} for {1}", animID, m_scenePresence.Name);
|
||||
if (m_scenePresence.Scene.DebugAnimations)
|
||||
m_log.DebugFormat(
|
||||
"[SCENE PRESENCE ANIMATOR]: Adding animation {0} {1} for {2}",
|
||||
GetAnimName(animID), animID, m_scenePresence.Name);
|
||||
|
||||
if (m_animations.Add(animID, m_scenePresence.ControllingClient.NextAnimationSequenceNumber, objectID))
|
||||
SendAnimPack();
|
||||
@@ -122,7 +125,10 @@ namespace OpenSim.Region.Framework.Scenes.Animation
|
||||
if (m_scenePresence.IsChildAgent)
|
||||
return;
|
||||
|
||||
// m_log.DebugFormat("[SCENE PRESENCE ANIMATOR]: Removing animation {0} for {1}", animID, m_scenePresence.Name);
|
||||
if (m_scenePresence.Scene.DebugAnimations)
|
||||
m_log.DebugFormat(
|
||||
"[SCENE PRESENCE ANIMATOR]: Removing animation {0} {1} for {2}",
|
||||
GetAnimName(animID), animID, m_scenePresence.Name);
|
||||
|
||||
if (m_animations.Remove(animID, allowNoDefault))
|
||||
SendAnimPack();
|
||||
@@ -145,9 +151,10 @@ namespace OpenSim.Region.Framework.Scenes.Animation
|
||||
|
||||
public void ResetAnimations()
|
||||
{
|
||||
// m_log.DebugFormat(
|
||||
// "[SCENE PRESENCE ANIMATOR]: Resetting animations for {0} in {1}",
|
||||
// m_scenePresence.Name, m_scenePresence.Scene.RegionInfo.RegionName);
|
||||
if (m_scenePresence.Scene.DebugAnimations)
|
||||
m_log.DebugFormat(
|
||||
"[SCENE PRESENCE ANIMATOR]: Resetting animations for {0} in {1}",
|
||||
m_scenePresence.Name, m_scenePresence.Scene.RegionInfo.RegionName);
|
||||
|
||||
m_animations.Clear();
|
||||
}
|
||||
@@ -558,5 +565,21 @@ namespace OpenSim.Region.Framework.Scenes.Animation
|
||||
|
||||
SendAnimPack(animIDs, sequenceNums, objectIDs);
|
||||
}
|
||||
|
||||
public string GetAnimName(UUID animId)
|
||||
{
|
||||
string animName;
|
||||
|
||||
if (!DefaultAvatarAnimations.AnimsNames.TryGetValue(animId, out animName))
|
||||
{
|
||||
AssetMetadata amd = m_scenePresence.Scene.AssetService.GetMetadata(animId.ToString());
|
||||
if (amd != null)
|
||||
animName = amd.Name;
|
||||
else
|
||||
animName = "Unknown";
|
||||
}
|
||||
|
||||
return animName;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -67,6 +67,11 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
|
||||
public bool EmergencyMonitoring = false;
|
||||
|
||||
/// <summary>
|
||||
/// Show debug information about animations.
|
||||
/// </summary>
|
||||
public bool DebugAnimations { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Show debug information about teleports.
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user