예제 #1
0
 public void OnMakeRootAgent(ScenePresence sp)
 {
     m_log.DebugFormat("[SIMIAN ACTIVITY DETECTOR]: Detected root presence {0} in {1}", sp.UUID, sp.Scene.RegionInfo.RegionName);
     Util.FireAndForget(delegate(object o)
     {
         m_GridUserService.SetLastPosition(sp.UUID.ToString(), sp.ControllingClient.SessionId, sp.Scene.RegionInfo.RegionID, sp.AbsolutePosition, sp.Lookat);
     }, null, "SimianActivityDetector.SetLastPositionOnMakeRootAgent");
 }
예제 #2
0
 public void OnMakeRootAgent(ScenePresence sp)
 {
     if (sp.PresenceType != PresenceType.Npc)
     {
         string userid = sp.Scene.UserManagementModule.GetUserUUI(sp.UUID);
         //m_log.DebugFormat("[ACTIVITY DETECTOR]: Detected root presence {0} in {1}", userid, sp.Scene.RegionInfo.RegionName);
         m_GridUserService.SetLastPosition(
             userid, UUID.Zero, sp.Scene.RegionInfo.RegionID, sp.AbsolutePosition, sp.Lookat);
     }
 }
예제 #3
0
        public void OnMakeRootAgent(ScenePresence sp)
        {
//            m_log.DebugFormat("[ACTIVITY DETECTOR]: Detected root presence {0} in {1}", sp.UUID, sp.Scene.RegionInfo.RegionName);

            if (sp.PresenceType != PresenceType.Npc)
            {
                m_GridUserService.SetLastPosition(
                    sp.UUID.ToString(), UUID.Zero, sp.Scene.RegionInfo.RegionID, sp.AbsolutePosition, sp.Lookat);
            }
        }
예제 #4
0
        public void DoOnMakeRootAgent(ScenePresence sp)
        {
            string userid;

            //m_log.DebugFormat("[ACTIVITY DETECTOR]: Detected root presence {0} in {1}", userid, sp.Scene.RegionInfo.RegionName);
            if (sp.Scene.UserManagementModule.GetUserUUI(sp.UUID, out userid))
            {
                /* we only setposition on known agents that have a valid lookup */
                m_GridUserService.SetLastPosition(
                    userid, UUID.Zero, sp.Scene.RegionInfo.RegionID, sp.AbsolutePosition, sp.Lookat);
            }
        }
        public bool SetLastPosition(string userID, UUID sessionID, UUID regionID, Vector3 position, Vector3 lookAt)
        {
            if (m_RemoteConnector.SetLastPosition(userID, sessionID, regionID, position, lookAt))
            {
                if (m_Infos.TryGetValue(userID, KEEPTIME * 1000, out GridUserInfo info))
                {
                    info.LastRegionID = regionID;
                    info.LastPosition = position;
                    info.LastLookAt   = lookAt;
                }
                return(true);
            }

            return(false);
        }
예제 #6
0
        public bool SetLastPosition(string userID, UUID sessionID, UUID regionID, Vector3 position, Vector3 lookAt)
        {
            if (m_RemoteConnector.SetLastPosition(userID, sessionID, regionID, position, lookAt))
            {
                // Update the cache too
                GridUserInfo info = null;
                if (m_Infos.TryGetValue(userID, out info))
                {
                    info.LastRegionID = regionID;
                    info.LastPosition = position;
                    info.LastLookAt   = lookAt;
                }
                return(true);
            }

            return(false);
        }
예제 #7
0
        byte[] SetPosition(Dictionary <string, object> request)
        {
            string  user     = string.Empty;
            UUID    region   = UUID.Zero;
            Vector3 position = new Vector3(128, 128, 70);
            Vector3 look     = Vector3.Zero;

            if (!request.ContainsKey("UserID") || !request.ContainsKey("RegionID"))
            {
                return(FailureResult());
            }

            if (!UnpackArgs(request, out user, out region, out position, out look))
            {
                return(FailureResult());
            }

            if (m_GridUserService.SetLastPosition(user, UUID.Zero, region, position, look))
            {
                return(SuccessResult());
            }

            return(FailureResult());
        }
예제 #8
0
 public bool SetLastPosition(string userID, UUID sessionID, UUID regionID, Vector3 position, Vector3 lookAt)
 {
     return(m_RemoteConnector.SetLastPosition(userID, sessionID, regionID, position, lookAt));
 }
 public bool SetLastPosition(string userID, UUID sessionID, UUID regionID, Vector3 lastPosition, Vector3 lastLookAt)
 {
     return(m_GridUserService.SetLastPosition(userID, sessionID, regionID, lastPosition, lastLookAt));
 }