mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-17 23:21:22 +00:00
Merge branch 'bottweaks' into 'master'
Bot fixes See merge request STJr/SRB2Internal!557
This commit is contained in:
commit
b98b56670e
2 changed files with 9 additions and 5 deletions
|
@ -135,7 +135,7 @@ static inline void B_BuildTailsTiccmd(mobj_t *sonic, mobj_t *tails, ticcmd_t *cm
|
||||||
// ********
|
// ********
|
||||||
// FLY MODE
|
// FLY MODE
|
||||||
// spinmode check
|
// spinmode check
|
||||||
if (spinmode)
|
if (spinmode || player->exiting)
|
||||||
thinkfly = false;
|
thinkfly = false;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -148,15 +148,19 @@ void P_ResetStarposts(void)
|
||||||
//
|
//
|
||||||
boolean P_CanPickupItem(player_t *player, boolean weapon)
|
boolean P_CanPickupItem(player_t *player, boolean weapon)
|
||||||
{
|
{
|
||||||
if (player->bot && weapon)
|
if (!player->mo || player->mo->health <= 0)
|
||||||
return false;
|
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)
|
if (player->powers[pw_flashing] > (flashingtics/4)*3 && player->powers[pw_flashing] < UINT16_MAX)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (player->mo && player->mo->health <= 0)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue