Fix bug where NPCs would establish child agents on other neighbour regions that had come up after the NPC was created.

xassetservice
Justin Clark-Casey (justincc) 2012-02-21 01:57:19 +00:00
parent 19d271d3fc
commit 90dc5f47e7
1 changed files with 13 additions and 14 deletions

View File

@ -871,7 +871,7 @@ namespace OpenSim.Region.Framework.Scenes
List<ulong> old = new List<ulong>();
old.Add(otherRegion.RegionHandle);
agent.DropOldNeighbours(old);
if (m_teleportModule != null)
if (m_teleportModule != null && agent.PresenceType != PresenceType.Npc)
m_teleportModule.EnableChildAgent(agent, otherRegion);
});
}
@ -881,7 +881,6 @@ namespace OpenSim.Region.Framework.Scenes
// This shouldn't happen too often anymore.
m_log.Error("[SCENE]: Couldn't inform client of regionup because we got a null reference exception");
}
}
else
{
@ -1010,7 +1009,7 @@ namespace OpenSim.Region.Framework.Scenes
{
ForEachRootScenePresence(delegate(ScenePresence agent)
{
if (m_teleportModule != null)
if (m_teleportModule != null && agent.PresenceType != PresenceType.Npc)
m_teleportModule.EnableChildAgent(agent, r);
});
}