Don't let the bot decide to fly if it doesn't have the ability to fly

This commit is contained in:
lachwright 2019-11-18 13:37:09 +08:00
parent 52a24e0bc4
commit 70051bd794
1 changed files with 3 additions and 2 deletions

View File

@ -158,7 +158,8 @@ static inline void B_BuildTailsTiccmd(mobj_t *sonic, mobj_t *tails, ticcmd_t *cm
&& (dist < touchdist)
&& !(pcmd->forwardmove || pcmd->sidemove || player->dashspeed)
&& P_IsObjectOnGround(sonic) && P_IsObjectOnGround(tails)
&& !(player->pflags & PF_STASIS))
&& !(player->pflags & PF_STASIS)
&& bot->charability == CA_FLY)
thinkfly = true;
else
thinkfly = false;
@ -324,7 +325,7 @@ static inline void B_BuildTailsTiccmd(mobj_t *sonic, mobj_t *tails, ticcmd_t *cm
else if (bot->pflags & PF_JUMPED && jump_last && tails->momz*flip > 0 && (zdist > 0 || panic))
jump = true;
// Start flying
else if (bot->pflags & PF_JUMPED && panic && !jump_last)
else if (bot->pflags & PF_JUMPED && panic && !jump_last && bot->charability == CA_FLY)
jump = true;
}