public static void ReadPlayerRotation(Client client, PacketReader reader) { PlayerRotationPacket pr = new PlayerRotationPacket(); pr.Read(reader); if (!reader.Failed) { Client.HandlePacketPlayerRotation(client, pr); } }
public static void HandlePacketPlayerRotation(Client client, PlayerRotationPacket packet) { client.Owner.RotateTo(packet.Yaw, packet.Pitch); client.OnGround = packet.OnGround; client.Owner.UpdateEntities(); }