When an NPC is created, stop telling neighbouring regions to expect a child agent

This commit is contained in:
Justin Clark-Casey (justincc)
2011-08-09 23:11:07 +01:00
parent 795c8e6c22
commit 92e96d394a
11 changed files with 32 additions and 30 deletions

View File

@@ -1144,10 +1144,14 @@ namespace OpenSim.Region.Framework.Scenes
/// <summary>
/// Complete Avatar's movement into the region.
/// This is called upon a very important packet sent from the client,
/// so it's client-controlled. Never call this method directly.
/// </summary>
public void CompleteMovement(IClientAPI client)
/// <param name="client"></param>
/// <param name="enableNeighbourChildAgents">
/// If true, send notification to neighbour regions to expect
/// a child agent from the client. These neighbours can be some distance away, depending right now on the
/// configuration of DefaultDrawDistance in the [Startup] section of config
/// </param>
public void CompleteMovement(IClientAPI client, bool enableNeighbourChildAgents)
{
// DateTime startTime = DateTime.Now;
@@ -1188,7 +1192,7 @@ namespace OpenSim.Region.Framework.Scenes
SendInitialData();
// Create child agents in neighbouring regions
if (!m_isChildAgent)
if (enableNeighbourChildAgents && !m_isChildAgent)
{
IEntityTransferModule m_agentTransfer = m_scene.RequestModuleInterface<IEntityTransferModule>();
if (m_agentTransfer != null)