Merge branch 'bottweaks' into 'master'

Bot fixes

See merge request STJr/SRB2Internal!557
This commit is contained in:
MascaraSnake 2019-11-26 17:24:15 -05:00
commit b98b56670e
2 changed files with 9 additions and 5 deletions

View File

@ -135,7 +135,7 @@ static inline void B_BuildTailsTiccmd(mobj_t *sonic, mobj_t *tails, ticcmd_t *cm
// ********
// FLY MODE
// spinmode check
if (spinmode)
if (spinmode || player->exiting)
thinkfly = false;
else
{

View File

@ -148,15 +148,19 @@ void P_ResetStarposts(void)
//
boolean P_CanPickupItem(player_t *player, boolean weapon)
{
if (player->bot && weapon)
if (!player->mo || player->mo->health <= 0)
return false;
if (player->bot)
{
if (weapon)
return false;
return P_CanPickupItem(&players[consoleplayer], true); // weapon is true to prevent infinite recursion if p1 is bot - doesn't occur in vanilla, but may be relevant for mods
}
if (player->powers[pw_flashing] > (flashingtics/4)*3 && player->powers[pw_flashing] < UINT16_MAX)
return false;
if (player->mo && player->mo->health <= 0)
return false;
return true;
}