From 2bc67bf813b9a80677b9c60e349a1fe7c2499956 Mon Sep 17 00:00:00 2001 From: toaster Date: Sun, 1 Dec 2019 13:31:33 +0000 Subject: [PATCH] Allow re-grabbing Tails AI mid-flight (resolves #428) --- src/b_bot.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/b_bot.c b/src/b_bot.c index 895c8d18d..b286dfff9 100644 --- a/src/b_bot.c +++ b/src/b_bot.c @@ -163,6 +163,12 @@ static inline void B_BuildTailsTiccmd(mobj_t *sonic, mobj_t *tails, ticcmd_t *cm else thinkfly = false; + // Set carried state + if (player->powers[pw_carry] == CR_PLAYER && sonic->tracer == tails) + { + flymode = 2; + } + // Ready for takeoff if (flymode == 1) { @@ -175,12 +181,6 @@ static inline void B_BuildTailsTiccmd(mobj_t *sonic, mobj_t *tails, ticcmd_t *cm // Abort if the player moves away or spins if (dist > followthres || player->dashspeed) flymode = 0; - - // Set carried state - if (player->powers[pw_carry] == CR_PLAYER && sonic->tracer == tails) - { - flymode = 2; - } } // Read player inputs while carrying else if (flymode == 2)