waste another thread job on another thing that should be part of a more

unified service, and also not hidding on a so called event"
This commit is contained in:
UbitUmarov
2016-07-27 02:54:32 +01:00
parent d6e16c5130
commit f4fa891928
2 changed files with 64 additions and 51 deletions

View File

@@ -68,6 +68,22 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Presence
public void OnMakeRootAgent(ScenePresence sp)
{
if (sp.isNPC)
return;
if(sp.gotCrossUpdate)
{
Util.FireAndForget(delegate
{
DoOnMakeRootAgent(sp);
}, null, "PresenceDetector_MakeRoot");
}
else
DoOnMakeRootAgent(sp);
}
public void DoOnMakeRootAgent(ScenePresence sp)
{
// m_log.DebugFormat("[PRESENCE DETECTOR]: Detected root presence {0} in {1}", sp.UUID, sp.Scene.RegionInfo.RegionName);
if (sp.PresenceType != PresenceType.Npc)
m_PresenceService.ReportAgent(sp.ControllingClient.SessionId, sp.Scene.RegionInfo.RegionID);