We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0f2bc5c commit ab3174aCopy full SHA for ab3174a
src/controls.ts
@@ -638,6 +638,7 @@ const endFlying = (sendAbilities = true) => {
638
let allowFlying = false
639
640
export const onBotCreate = () => {
641
+ let wasSpectatorFlying = false
642
bot._client.on('abilities', ({ flags }) => {
643
if (flags & 2) { // flying
644
toggleFly(true, false)
@@ -649,6 +650,10 @@ export const onBotCreate = () => {
649
650
const gamemodeCheck = () => {
651
if (bot.game.gameMode === 'spectator') {
652
653
+ wasSpectatorFlying = true
654
+ } else if (wasSpectatorFlying) {
655
+ toggleFly(false, false)
656
+ wasSpectatorFlying = false
657
}
658
659
bot.on('game', () => {
0 commit comments