public override void ClientUpdate(uint timestamp)
        {
            base.ClientUpdate(timestamp);

            if (MySession.Static.ControlledEntity != m_character)
            {
                if (m_supportTimeStamp != null)
                {
                    m_supportTimeStamp.Clear();
                }
                return;
            }

            MyEntity support = MySupportHelper.FindSupportForCharacterAABB(m_character);

            if (support != null)
            {
                if (m_supportTimeStamp == null)
                {
                    m_supportTimeStamp = new MyTimestampHelper(null);
                }

                m_supportTimeStamp.SetEntity(support);
                m_supportTimeStamp.Update(timestamp);
            }
            else
            {
                if (m_supportTimeStamp != null)
                {
                    m_supportTimeStamp.Clear();
                }
            }
        }
        public override void ClientUpdate(uint timestamp)
        {
            base.ClientUpdate(timestamp);

            if (MySession.Static.ControlledEntity != m_character)
            {
                if(m_supportTimeStamp != null)
                {
                    m_supportTimeStamp.Clear();
                }
                return;
            }

            MyEntity support = MySupportHelper.FindSupportForCharacterAABB(m_character);
            if (support != null)
            {
                if (m_supportTimeStamp == null)
                {
                    m_supportTimeStamp = new MyTimestampHelper(null);
                }

                m_supportTimeStamp.SetEntity(support);
                m_supportTimeStamp.Update(timestamp);
            }
            else
            {
                if (m_supportTimeStamp != null)
                {
                    m_supportTimeStamp.Clear();
                }
            }

        }
        public override void ClientUpdate(uint timestamp)
        {
            base.ClientUpdate(timestamp);

            if (MySession.Static.ControlledEntity != m_character)
            {
                if(m_supportTimeStamp != null)
                {
                    m_supportTimeStamp.Clear();
                }
                return;
            }

            var physGroup = MyExternalReplicable.FindByObject(m_character).FindStateGroup<MyCharacterPhysicsStateGroup>();
            if (physGroup == null)
            {
                if (m_supportTimeStamp != null)
                {
                    m_supportTimeStamp.Clear();
                }
                return;
            }

            m_supportPhysics = physGroup.FindSupportDelegate();
            physGroup.SetSupport(m_supportPhysics);
            if (m_supportPhysics != null)
            {
                if (m_supportTimeStamp == null)
                {
                    m_supportTimeStamp = new MyTimestampHelper(null);
                }

                m_supportTimeStamp.SetEntity(m_supportPhysics.Entity);
                m_supportTimeStamp.Update(timestamp);
            }
            else
            {
                if (m_supportTimeStamp != null)
                {
                    m_supportTimeStamp.Clear();
                }
            }

        }
Ejemplo n.º 4
0
        public override void ClientUpdate(uint timestamp)
        {
            base.ClientUpdate(timestamp);

            if (MySession.Static.ControlledEntity != m_character)
            {
                if (m_supportTimeStamp != null)
                {
                    m_supportTimeStamp.Clear();
                }
                return;
            }

            var physGroup = MyExternalReplicable.FindByObject(m_character).FindStateGroup <MyCharacterPhysicsStateGroup>();

            if (physGroup == null)
            {
                if (m_supportTimeStamp != null)
                {
                    m_supportTimeStamp.Clear();
                }
                return;
            }

            m_supportPhysics = physGroup.FindSupportDelegate();
            physGroup.SetSupport(m_supportPhysics);
            if (m_supportPhysics != null)
            {
                if (m_supportTimeStamp == null)
                {
                    m_supportTimeStamp = new MyTimestampHelper(null);
                }

                m_supportTimeStamp.SetEntity(m_supportPhysics.Entity);
                m_supportTimeStamp.Update(timestamp);
            }
            else
            {
                if (m_supportTimeStamp != null)
                {
                    m_supportTimeStamp.Clear();
                }
            }
        }
        public virtual void ClientUpdate(uint timestamp)
        {
            MyEntity entity = MySession.Static.ControlledEntity as MyEntity;
            if (entity == null || entity.GetTopMostParent() != Entity)
            {
                if(m_timestamp != null)
                {
                    m_timestamp.Clear();
                }
                return;
            }
            if(m_timestamp == null)
            {
                m_timestamp = new MyTimestampHelper(Entity);
            }

            m_timestamp.Update(timestamp);
            m_currentTimeStamp = timestamp;
        }
        public virtual void ClientUpdate(uint timestamp)
        {
            MyEntity entity = MySession.Static.ControlledEntity as MyEntity;

            if (entity == null || entity.GetTopMostParent() != Entity)
            {
                if (m_timestamp != null)
                {
                    m_timestamp.Clear();
                }
                return;
            }
            if (m_timestamp == null)
            {
                m_timestamp = new MyTimestampHelper(Entity);
            }

            m_timestamp.Update(timestamp);
            m_currentTimeStamp = timestamp;
        }