diff options
-rw-r--r-- | OpenSim/Region/CoreModules/ServiceConnectorsOut/GridUser/ActivityDetector.cs | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/GridUser/ActivityDetector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/GridUser/ActivityDetector.cs index f523c73..a64f785 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/GridUser/ActivityDetector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/GridUser/ActivityDetector.cs | |||
@@ -42,7 +42,6 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.GridUser | |||
42 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 42 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
43 | 43 | ||
44 | private IGridUserService m_GridUserService; | 44 | private IGridUserService m_GridUserService; |
45 | private Scene m_aScene; | ||
46 | 45 | ||
47 | public ActivityDetector(IGridUserService guservice) | 46 | public ActivityDetector(IGridUserService guservice) |
48 | { | 47 | { |
@@ -56,9 +55,6 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.GridUser | |||
56 | // But we could trigger the position update more often | 55 | // But we could trigger the position update more often |
57 | scene.EventManager.OnMakeRootAgent += OnMakeRootAgent; | 56 | scene.EventManager.OnMakeRootAgent += OnMakeRootAgent; |
58 | scene.EventManager.OnNewClient += OnNewClient; | 57 | scene.EventManager.OnNewClient += OnNewClient; |
59 | |||
60 | if (m_aScene == null) | ||
61 | m_aScene = scene; | ||
62 | } | 58 | } |
63 | 59 | ||
64 | public void RemoveRegion(Scene scene) | 60 | public void RemoveRegion(Scene scene) |
@@ -69,14 +65,8 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.GridUser | |||
69 | 65 | ||
70 | public void OnMakeRootAgent(ScenePresence sp) | 66 | public void OnMakeRootAgent(ScenePresence sp) |
71 | { | 67 | { |
72 | UUID sessionID = UUID.Zero; | ||
73 | |||
74 | IClientAPI client; | ||
75 | if (m_aScene.TryGetClient(sp.UUID, out client)) | ||
76 | sessionID = client.SessionId; | ||
77 | |||
78 | m_log.DebugFormat("[ACTIVITY DETECTOR]: Detected root presence {0} in {1}", sp.UUID, sp.Scene.RegionInfo.RegionName); | 68 | m_log.DebugFormat("[ACTIVITY DETECTOR]: Detected root presence {0} in {1}", sp.UUID, sp.Scene.RegionInfo.RegionName); |
79 | m_GridUserService.SetLastPosition(sp.UUID.ToString(), sessionID, sp.Scene.RegionInfo.RegionID, sp.AbsolutePosition, sp.Lookat); | 69 | m_GridUserService.SetLastPosition(sp.UUID.ToString(), UUID.Zero, sp.Scene.RegionInfo.RegionID, sp.AbsolutePosition, sp.Lookat); |
80 | } | 70 | } |
81 | 71 | ||
82 | public void OnNewClient(IClientAPI client) | 72 | public void OnNewClient(IClientAPI client) |