Updates the fly command so when stopping flying it clears hover state correctly
This commit is contained in:
parent
04a927848c
commit
ffe8672f08
1 changed files with 9 additions and 1 deletions
|
|
@ -1,4 +1,6 @@
|
||||||
namespace BSB.Commands.Movement
|
using System.Threading;
|
||||||
|
|
||||||
|
namespace BSB.Commands.Movement
|
||||||
{
|
{
|
||||||
public class BotFly : CoreCommand_1arg
|
public class BotFly : CoreCommand_1arg
|
||||||
{
|
{
|
||||||
|
|
@ -11,6 +13,12 @@
|
||||||
{
|
{
|
||||||
if (bool.TryParse(args[0], out bool status) == true)
|
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.Fly = status;
|
||||||
bot.GetClient.Self.Movement.SendUpdate();
|
bot.GetClient.Self.Movement.SendUpdate();
|
||||||
return true;
|
return true;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue