C_Minebot.Packets.EntlookRelmove.EntlookRelmove C# (CSharp) Метод

EntlookRelmove() публичный Метод

public EntlookRelmove ( Wrapped socket, System.Form1 mainform ) : System
socket Wrapped
mainform System.Form1
Результат System
        public EntlookRelmove(Wrapped.Wrapped socket, Form1 mainform)
        {
            int EID = socket.readInt();
            sbyte dx = (sbyte)socket.readByte();
            sbyte dy = (sbyte)socket.readByte();
            sbyte dz = (sbyte)socket.readByte();
            byte yaw = socket.readByte();
            byte pitch = socket.readByte();
            functions helper = new functions();

            Classes.Entity thisEnt = helper.getEntbyID(EID, mainform);

            if (thisEnt != null) {
                thisEnt.yaw = yaw;
                thisEnt.pitch = pitch;
                thisEnt.X += dx;
                thisEnt.Y += dy;
                thisEnt.Z += dz;

                if (mainform.following == true && thisEnt.name == mainform.fname) {
                    mainform.location[0] = thisEnt.X / 32;
                    mainform.location[1] = thisEnt.Y / 32;
                    mainform.location[2] = thisEnt.Z /32;
                    mainform.location[3] = thisEnt.Y / 32 + 1;
                }
            }
        }
EntlookRelmove