Exemple #1
0
 public virtual void SetSendCourseLocationMethod (SendCourseLocationsMethod d)
 {
     if (d != null)
         m_sendCourseLocationsMethod = d;
 }
Exemple #2
0
 public ScenePresence()
 {
     m_sendCourseLocationsMethod = SendCoarseLocationsDefault;
 }
        private ScenePresence(IClientAPI client, Scene world, RegionInfo reginfo)
        {
            m_animator = new ScenePresenceAnimator(this);
            m_sendCourseLocationsMethod = SendCoarseLocationsDefault;
            CreateSceneViewer();
            m_rootRegionHandle = reginfo.RegionHandle;
            m_controllingClient = client;
            m_firstname = m_controllingClient.FirstName;
            m_lastname = m_controllingClient.LastName;
            m_name = String.Format("{0} {1}", m_firstname, m_lastname);
            m_scene = world;
            m_uuid = client.AgentId;
            m_regionInfo = reginfo;
            m_localId = m_scene.AllocateLocalId();

            IGroupsModule gm = m_scene.RequestModuleInterface<IGroupsModule>();
            if (gm != null)
                m_grouptitle = gm.GetGroupTitle(m_uuid);

            m_scriptEngines = m_scene.RequestModuleInterfaces<IScriptModule>();
            
            AbsolutePosition = posLastSignificantMove = m_CameraCenter =
                m_lastCameraCenter = m_controllingClient.StartPos;

            m_reprioritization_timer = new Timer(world.ReprioritizationInterval);
            m_reprioritization_timer.Elapsed += new ElapsedEventHandler(Reprioritize);
            m_reprioritization_timer.AutoReset = false;


            AdjustKnownSeeds();

            // TODO: I think, this won't send anything, as we are still a child here...
            Animator.TrySetMovementAnimation("STAND"); 

            // we created a new ScenePresence (a new child agent) in a fresh region.
            // Request info about all the (root) agents in this region
            // Note: This won't send data *to* other clients in that region (children don't send)
            SendInitialFullUpdateToAllClients();

            RegisterToEvents();
            SetDirectionVectors();
        }
 public ScenePresence()
 {
     m_sendCourseLocationsMethod = SendCoarseLocationsDefault;
     CreateSceneViewer();
     m_animator = new ScenePresenceAnimator(this);
 }
 public ScenePresence()
 {
     IsTainted = false;
     SitGround = false;
     CurrentParcel = null;
     m_sendCourseLocationsMethod = SendCoarseLocationsDefault;
 }
 public ScenePresence()
 {
     m_sendCourseLocationsMethod = SendCoarseLocationsDefault;
     CreateSceneViewer();
 }
Exemple #7
0
        public ScenePresence(
            IClientAPI client, Scene world, AvatarAppearance appearance, PresenceType type)
        {
            AttachmentsSyncLock = new Object();

            IsChildAgent = true;
            m_sendCourseLocationsMethod = SendCoarseLocationsDefault;
            Animator = new ScenePresenceAnimator(this);
            PresenceType = type;
            DrawDistance = world.DefaultDrawDistance;
            RegionHandle = world.RegionInfo.RegionHandle;
            ControllingClient = client;
            Firstname = ControllingClient.FirstName;
            Lastname = ControllingClient.LastName;
            m_name = String.Format("{0} {1}", Firstname, Lastname);
            m_scene = world;
            m_uuid = client.AgentId;
            LocalId = m_scene.AllocateLocalId();

            UserAccount account = m_scene.UserAccountService.GetUserAccount(m_scene.RegionInfo.ScopeID, m_uuid);
            if (account != null)
                m_userFlags = account.UserFlags;
            else
                m_userFlags = 0;

            if (account != null)
                UserLevel = account.UserLevel;

            IGroupsModule gm = m_scene.RequestModuleInterface<IGroupsModule>();
            if (gm != null)
                Grouptitle = gm.GetGroupTitle(m_uuid);

            m_scriptEngines = m_scene.RequestModuleInterfaces<IScriptModule>();
            
            AbsolutePosition = posLastSignificantMove = CameraPosition =
                m_lastCameraPosition = ControllingClient.StartPos;

            m_reprioritization_timer = new Timer(world.ReprioritizationInterval);
            m_reprioritization_timer.Elapsed += new ElapsedEventHandler(Reprioritize);
            m_reprioritization_timer.AutoReset = false;

            AdjustKnownSeeds();

            RegisterToEvents();
            SetDirectionVectors();

            Appearance = appearance;
        }
 public ScenePresence()
 {
     if (DefaultTexture == null)
     {
         Primitive.TextureEntry textu = AvatarAppearance.GetDefaultTexture();
         DefaultTexture = textu.GetBytes();
     }
     m_sendCourseLocationsMethod = SendCoarseLocationsDefault;
     CreateSceneViewer();
 }
Exemple #9
0
        public ScenePresence(
            IClientAPI client, Scene world, AvatarAppearance appearance, PresenceType type)
        {
            AttachmentsSyncLock = new Object();

            m_sendCourseLocationsMethod = SendCoarseLocationsDefault;
            Animator = new ScenePresenceAnimator(this);
            PresenceType = type;
            DrawDistance = world.DefaultDrawDistance;
            RegionHandle = world.RegionInfo.RegionHandle;
            ControllingClient = client;
            Firstname = ControllingClient.FirstName;
            Lastname = ControllingClient.LastName;
            m_name = String.Format("{0} {1}", Firstname, Lastname);
            m_scene = world;
            m_uuid = client.AgentId;
            LocalId = m_scene.AllocateLocalId();

            UserAccount account = m_scene.UserAccountService.GetUserAccount(m_scene.RegionInfo.ScopeID, m_uuid);
            if (account != null)
                m_userFlags = account.UserFlags;
            else
                m_userFlags = 0;

            if (account != null)
                UserLevel = account.UserLevel;

            IGroupsModule gm = m_scene.RequestModuleInterface<IGroupsModule>();
            if (gm != null)
                Grouptitle = gm.GetGroupTitle(m_uuid);

            m_scriptEngines = m_scene.RequestModuleInterfaces<IScriptModule>();
            
            AbsolutePosition = posLastSignificantMove = CameraPosition =
                m_lastCameraPosition = ControllingClient.StartPos;

            m_reprioritization_timer = new Timer(world.ReprioritizationInterval);
            m_reprioritization_timer.Elapsed += new ElapsedEventHandler(Reprioritize);
            m_reprioritization_timer.AutoReset = false;

            AdjustKnownSeeds();

            // TODO: I think, this won't send anything, as we are still a child here...
            Animator.TrySetMovementAnimation("STAND"); 

            // we created a new ScenePresence (a new child agent) in a fresh region.
            // Request info about all the (root) agents in this region
            // Note: This won't send data *to* other clients in that region (children don't send)

// MIC: This gets called again in CompleteMovement
            // SendInitialFullUpdateToAllClients();
            SendOtherAgentsAvatarDataToMe();
            SendOtherAgentsAppearanceToMe();

            RegisterToEvents();
            SetDirectionVectors();

            Appearance = appearance;
        }