do GridUserService.SetLastPosition async on crossings

LSLKeyTest
UbitUmarov 2016-07-26 22:09:06 +01:00
parent e0e8b784a5
commit f19b3d28bd
1 changed files with 23 additions and 10 deletions

View File

@ -65,7 +65,21 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.GridUser
public void OnMakeRootAgent(ScenePresence sp) public void OnMakeRootAgent(ScenePresence sp)
{ {
if (sp.PresenceType != PresenceType.Npc) if (sp.isNPC)
return;
if(sp.gotCrossUpdate)
{
Util.FireAndForget(delegate
{
DoOnMakeRootAgent(sp);
}, null, "ActivityDetector_MakeRoot");
}
else
DoOnMakeRootAgent(sp);
}
public void DoOnMakeRootAgent(ScenePresence sp)
{ {
string userid; string userid;
//m_log.DebugFormat("[ACTIVITY DETECTOR]: Detected root presence {0} in {1}", userid, sp.Scene.RegionInfo.RegionName); //m_log.DebugFormat("[ACTIVITY DETECTOR]: Detected root presence {0} in {1}", userid, sp.Scene.RegionInfo.RegionName);
@ -76,7 +90,6 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.GridUser
userid, UUID.Zero, sp.Scene.RegionInfo.RegionID, sp.AbsolutePosition, sp.Lookat); userid, UUID.Zero, sp.Scene.RegionInfo.RegionID, sp.AbsolutePosition, sp.Lookat);
} }
} }
}
public void OnNewClient(IClientAPI client) public void OnNewClient(IClientAPI client)
{ {