aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/GridUser/ActivityDetector.cs33
1 files changed, 23 insertions, 10 deletions
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/GridUser/ActivityDetector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/GridUser/ActivityDetector.cs
index 2238c90..98ccc95 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/GridUser/ActivityDetector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/GridUser/ActivityDetector.cs
@@ -63,18 +63,31 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.GridUser
63 scene.EventManager.OnNewClient -= OnNewClient; 63 scene.EventManager.OnNewClient -= OnNewClient;
64 } 64 }
65 65
66 public void OnMakeRootAgent(ScenePresence sp) 66 public void OnMakeRootAgent(ScenePresence sp)
67 { 67 {
68 if (sp.PresenceType != PresenceType.Npc) 68 if (sp.isNPC)
69 return;
70
71 if(sp.gotCrossUpdate)
69 { 72 {
70 string userid; 73 Util.FireAndForget(delegate
71 //m_log.DebugFormat("[ACTIVITY DETECTOR]: Detected root presence {0} in {1}", userid, sp.Scene.RegionInfo.RegionName);
72 if (sp.Scene.UserManagementModule.GetUserUUI(sp.UUID, out userid))
73 { 74 {
74 /* we only setposition on known agents that have a valid lookup */ 75 DoOnMakeRootAgent(sp);
75 m_GridUserService.SetLastPosition( 76 }, null, "ActivityDetector_MakeRoot");
76 userid, UUID.Zero, sp.Scene.RegionInfo.RegionID, sp.AbsolutePosition, sp.Lookat); 77 }
77 } 78 else
79 DoOnMakeRootAgent(sp);
80 }
81
82 public void DoOnMakeRootAgent(ScenePresence sp)
83 {
84 string userid;
85 //m_log.DebugFormat("[ACTIVITY DETECTOR]: Detected root presence {0} in {1}", userid, sp.Scene.RegionInfo.RegionName);
86 if (sp.Scene.UserManagementModule.GetUserUUI(sp.UUID, out userid))
87 {
88 /* we only setposition on known agents that have a valid lookup */
89 m_GridUserService.SetLastPosition(
90 userid, UUID.Zero, sp.Scene.RegionInfo.RegionID, sp.AbsolutePosition, sp.Lookat);
78 } 91 }
79 } 92 }
80 93