Bot item behavior fixups

This commit is contained in:
Antonio Martinez 2025-09-15 15:51:08 -04:00
parent 751934250c
commit 53083d14fa
2 changed files with 7 additions and 4 deletions

View file

@ -47,7 +47,7 @@
--------------------------------------------------*/ --------------------------------------------------*/
static inline boolean K_ItemButtonWasDown(const player_t *player) static inline boolean K_ItemButtonWasDown(const player_t *player)
{ {
return (player->oldcmd.buttons & BT_ATTACK); return !!(player->oldcmd.buttons & BT_ATTACK);
} }
/*-------------------------------------------------- /*--------------------------------------------------
@ -1234,6 +1234,9 @@ static void K_BotItemBubble(const player_t *player, ticcmd_t *cmd)
boolean hold = false; boolean hold = false;
if (player->botvars.itemconfirm > 10*TICRATE)
hold = true;
if (player->bubbleblowup <= 0) if (player->bubbleblowup <= 0)
{ {
UINT8 i; UINT8 i;

View file

@ -350,9 +350,6 @@ botItemPriority_e K_GetBotItemPriority(kartitems_t result)
case KITEM_INVINCIBILITY: case KITEM_INVINCIBILITY:
case KITEM_GROW: case KITEM_GROW:
case KITEM_SHRINK: case KITEM_SHRINK:
case KITEM_LIGHTNINGSHIELD:
case KITEM_BUBBLESHIELD:
case KITEM_FLAMESHIELD:
{ {
// Items that drastically improve your own defense and/or speed. // Items that drastically improve your own defense and/or speed.
return BOT_ITEM_PR_POWER; return BOT_ITEM_PR_POWER;
@ -389,6 +386,9 @@ botItemPriority_e K_GetBotItemPriority(kartitems_t result)
case KITEM_JAWZ: case KITEM_JAWZ:
case KITEM_BANANA: case KITEM_BANANA:
case KITEM_MINE: case KITEM_MINE:
case KITEM_LIGHTNINGSHIELD:
case KITEM_BUBBLESHIELD:
case KITEM_FLAMESHIELD:
{ {
// Used in all other instances (close to other players, no priority override) // Used in all other instances (close to other players, no priority override)
// Typically attack items that give you protection. // Typically attack items that give you protection.