public void ClientTick(RealmTime time, MovePacket packet)
        {
            //oldClientTime = curClientTime;
            //curClientTime = packet.Time;
            //if (first5 < 5) first5++;
            //if (oldClientTime == 0 || first5 < 5) return;

            //if (curClientTime - oldClientTime >= 500 || curClientTime - oldClientTime <= 100)
            //{
            //    Client.Disconnect();
            //    Owner.BroadcastPacket(new TextPacket
            //    {
            //        Name = "@ANNOUNCEMENT",
            //        BubbleTime = 0,
            //        CleanText = "",
            //        ObjectId = 0,
            //        Recipient = "",
            //        Stars = -1,
            //        Text = String.Format("{0} just tried to speedhack!\ntimedifference: {1}", Name, curClientTime - oldClientTime)
            //    }, null);
            //}
            //SendInfo((curClientTime - oldClientTime).ToString());
        }
Ejemplo n.º 2
0
        public void Move(RealmTime time, MovePacket pkt)
        {
            if (pkt.Position.X == -1 || pkt.Position.Y == -1) return;

            double newX = X; double newY = Y;
            if (newX != pkt.Position.X)
            {
                newX = pkt.Position.X;
                UpdateCount++;
            }
            if (newY != pkt.Position.Y)
            {
                newY = pkt.Position.Y;
                UpdateCount++;
            }
            Move((float)newX, (float)newY);
        }
Ejemplo n.º 3
0
        public void Move(RealmTime time, MovePacket pkt)
        {
            if (pkt.Position.X == -1 || pkt.Position.Y == -1) return;

            double newX = X; double newY = Y;
            if (newX != pkt.Position.X)
            {
                newX = pkt.Position.X;
                UpdateCount++;
            }
            if (newY != pkt.Position.Y)
            {
                newY = pkt.Position.Y;
                UpdateCount++;
            }

            if (HasConditionEffect(ConditionEffects.Paused) == true)
            {
                ApplyConditionEffect(new ConditionEffect()
                {
                    Effect = ConditionEffectIndex.Paused,
                    DurationMS = -1
                });
            }
            else if (HasConditionEffect(ConditionEffects.Paused) == false)
            {
                ApplyConditionEffect(new ConditionEffect()
                {
                    Effect = ConditionEffectIndex.Paused,
                    DurationMS = 0
                });
            }
            Move((float)newX, (float)newY);
        }