Пример #1
0
        public void AddMoveEvent(int x, int y, int z, int facing, bool createdByPlayerInput)
        {
            MoveEvent moveEvent = new MoveEvent(x, y, z, facing, m_FastWalkKey);

            moveEvent.CreatedByPlayerInput = createdByPlayerInput;

            m_history[m_sequenceQueued] = moveEvent;

            m_sequenceQueued += 1;
            if (m_sequenceQueued > byte.MaxValue)
            {
                m_sequenceQueued = 1;
            }
        }
Пример #2
0
 public void MoveRequestReject(int sequence, out int x, out int y, out int z, out int facing)
 {
     if (m_history[sequence] != null)
     {
         MoveEvent e = m_history[sequence];
         x      = e.X;
         y      = e.Y;
         z      = e.Z;
         facing = e.Facing;
     }
     else
     {
         x = y = z = facing = -1;
     }
     ResetMoveSequence();
 }
Пример #3
0
 public MoveEvent GetMoveEvent(out int sequence)
 {
     if (m_history[m_sequenceNextSend] != null)
     {
         MoveEvent m = m_history[m_sequenceNextSend];
         m_history[m_sequenceNextSend] = null;
         sequence = m_sequenceNextSend;
         m_sequenceNextSend++;
         if (m_sequenceNextSend > byte.MaxValue)
         {
             m_sequenceNextSend = 1;
         }
         return(m);
     }
     else
     {
         sequence = 0;
         return(null);
     }
 }