diff options
author | UbitUmarov | 2016-07-26 22:09:06 +0100 |
---|---|---|
committer | UbitUmarov | 2016-07-26 22:09:06 +0100 |
commit | f19b3d28bd9a467f1da7fef51fe86b9da223462c (patch) | |
tree | f251c7ca9d5fa66335d902dd808bc904594a96a8 /OpenSim/Region/CoreModules | |
parent | apply the change to groups v2 also (diff) | |
download | opensim-SC_OLD-f19b3d28bd9a467f1da7fef51fe86b9da223462c.zip opensim-SC_OLD-f19b3d28bd9a467f1da7fef51fe86b9da223462c.tar.gz opensim-SC_OLD-f19b3d28bd9a467f1da7fef51fe86b9da223462c.tar.bz2 opensim-SC_OLD-f19b3d28bd9a467f1da7fef51fe86b9da223462c.tar.xz |
do GridUserService.SetLastPosition async on crossings
Diffstat (limited to 'OpenSim/Region/CoreModules')
-rw-r--r-- | OpenSim/Region/CoreModules/ServiceConnectorsOut/GridUser/ActivityDetector.cs | 33 |
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 | ||