mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-15 01:01:33 +00:00
Allow re-grabbing Tails AI mid-flight (resolves #428)
This commit is contained in:
parent
ae2594e5ce
commit
2bc67bf813
1 changed files with 6 additions and 6 deletions
12
src/b_bot.c
12
src/b_bot.c
|
@ -163,6 +163,12 @@ static inline void B_BuildTailsTiccmd(mobj_t *sonic, mobj_t *tails, ticcmd_t *cm
|
||||||
else
|
else
|
||||||
thinkfly = false;
|
thinkfly = false;
|
||||||
|
|
||||||
|
// Set carried state
|
||||||
|
if (player->powers[pw_carry] == CR_PLAYER && sonic->tracer == tails)
|
||||||
|
{
|
||||||
|
flymode = 2;
|
||||||
|
}
|
||||||
|
|
||||||
// Ready for takeoff
|
// Ready for takeoff
|
||||||
if (flymode == 1)
|
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
|
// Abort if the player moves away or spins
|
||||||
if (dist > followthres || player->dashspeed)
|
if (dist > followthres || player->dashspeed)
|
||||||
flymode = 0;
|
flymode = 0;
|
||||||
|
|
||||||
// Set carried state
|
|
||||||
if (player->powers[pw_carry] == CR_PLAYER && sonic->tracer == tails)
|
|
||||||
{
|
|
||||||
flymode = 2;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
// Read player inputs while carrying
|
// Read player inputs while carrying
|
||||||
else if (flymode == 2)
|
else if (flymode == 2)
|
||||||
|
|
Loading…
Reference in a new issue