Ejemplo n.º 1
0
        internal void HandleMsgLagPing(ServerPlayer player, MsgLagPing ping)
        {
            if (ping == null)
            {
                return;
            }

            player.Lag.ReceivePing(ping.SequenceNumber, GameTime.Now);
            PlayerLagUpdated?.Invoke(this, player);
        }
Ejemplo n.º 2
0
        protected void CheckLagPings(ServerPlayer player)
        {
            if (player.Lag.LastPingSent + PingTime < GameTime.Now)
            {
                player.Lag.LastPingSent = GameTime.Now;

                MsgLagPing ping = new MsgLagPing();
                ping.SequenceNumber = player.Lag.GetPing(GameTime.Now);
                player.SendMessage(false, ping);
            }
        }
Ejemplo n.º 3
0
        private static void HandleLagPing(NetworkMessage msg)
        {
            MsgLagPing ping = msg as MsgLagPing;

            client.SendMessage(ping.FromUDP, ping);
        }