示例#1
0
        private void HandlePacketDash(BinaryReader reader, int code, int sender)
        {
            float dSpeed     = reader.ReadSingle();
            float dThreshold = reader.ReadSingle();
            float dMax       = reader.ReadSingle();
            float dMin       = reader.ReadSingle();
            int   dEffect    = reader.ReadInt32();

            if (Main.netMode == 2)
            {
                ModPacket me = GetPacket();
                me.Write(code);
                me.Write(sender);
                me.Write(dSpeed);
                me.Write(dThreshold);
                me.Write(dMax);
                me.Write(dMin);
                me.Write(dEffect);
                me.Send(-1, sender);
                //-/ Console.WriteLine("echo " + dSpeed + " dash " + dEffect + " from " + sender);
            }
            else
            {
                ModPlayerFists pfx = Main.player[sender].GetModPlayer <ModPlayerFists>();
                pfx.SetDash(dSpeed, dThreshold, dMax, dMin, true, dEffect);
            }
        }