From ffe8672f08286150d14164e77fe14d7fd2d67888 Mon Sep 17 00:00:00 2001 From: Madpeter Date: Mon, 11 May 2020 12:07:33 +0100 Subject: [PATCH] Updates the fly command so when stopping flying it clears hover state correctly --- Core/Commands/Movement/Fly.cs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Core/Commands/Movement/Fly.cs b/Core/Commands/Movement/Fly.cs index c77b2c2..e80412a 100644 --- a/Core/Commands/Movement/Fly.cs +++ b/Core/Commands/Movement/Fly.cs @@ -1,4 +1,6 @@ -namespace BSB.Commands.Movement +using System.Threading; + +namespace BSB.Commands.Movement { public class BotFly : CoreCommand_1arg { @@ -11,6 +13,12 @@ { if (bool.TryParse(args[0], out bool status) == true) { + if(status == false) + { + bot.GetClient.Self.Movement.Fly = true; + bot.GetClient.Self.Movement.SendUpdate(); + Thread.Sleep(200); + } bot.GetClient.Self.Movement.Fly = status; bot.GetClient.Self.Movement.SendUpdate(); return true;