Stop SP.HandleAgentUpdate() and PhysicsCollisionUpdate() from being processed if we're dealing with a child ScenePresence.

Neither of these can have any effect on child agents
Now leaving warning about trying to set animation on a child agent active.  Might temporarily pop up now and again.
iar_mods
Justin Clark-Casey (justincc) 2011-12-03 00:09:18 +00:00
parent 054ebe8878
commit 96c191f4fd
2 changed files with 13 additions and 12 deletions

View File

@ -158,14 +158,12 @@ namespace OpenSim.Region.Framework.Scenes.Animation
SendAnimPack();
}
}
// Don't leave this on since on teleports SP.HandleAgentUpdate() still hammers us for a while after it teleports
// else
// {
// m_log.WarnFormat(
// "[SCENE PRESENCE ANIMATOR]: Tried to set movement animation {0} on child presence {1}",
// anim, m_scenePresence.Name);
// throw new Exception(string.Format("aaargh on setting {0}", anim));
// }
else
{
m_log.WarnFormat(
"[SCENE PRESENCE ANIMATOR]: Tried to set movement animation {0} on child presence {1}",
anim, m_scenePresence.Name);
}
}
/// <summary>

View File

@ -1293,11 +1293,11 @@ namespace OpenSim.Region.Framework.Scenes
// "[SCENE PRESENCE]: In {0} received agent update from {1}",
// Scene.RegionInfo.RegionName, remoteClient.Name);
//if (IsChildAgent)
//{
if (IsChildAgent)
{
// // m_log.Debug("DEBUG: HandleAgentUpdate: child agent");
// return;
//}
return;
}
++m_movementUpdateCount;
if (m_movementUpdateCount < 1)
@ -3280,6 +3280,9 @@ namespace OpenSim.Region.Framework.Scenes
// Event called by the physics plugin to tell the avatar about a collision.
private void PhysicsCollisionUpdate(EventArgs e)
{
if (IsChildAgent)
return;
//if ((Math.Abs(Velocity.X) > 0.1e-9f) || (Math.Abs(Velocity.Y) > 0.1e-9f))
// The Physics Scene will send updates every 500 ms grep: PhysicsActor.SubscribeEvents(
// as of this comment the interval is set in AddToPhysicalScene