Merge branch 'get-this-shit-off-me' into 'master'

Bot item behavior fixups

See merge request kart-krew-dev/ring-racers-internal!2855
This commit is contained in:
Oni VelocitOni 2025-09-16 02:00:13 +00:00
commit 50a00586e2
2 changed files with 9 additions and 6 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);
} }
/*-------------------------------------------------- /*--------------------------------------------------
@ -950,7 +950,7 @@ static void K_BotItemOrbinaut(const player_t *player, ticcmd_t *cmd)
cmd->buttons |= BT_LOOKBACK; cmd->buttons |= BT_LOOKBACK;
} }
if (player->botvars.itemconfirm > 25*TICRATE) if (player->botvars.itemconfirm > 10*TICRATE)
{ {
K_BotGenericPressItem(player, cmd, throwdir); K_BotGenericPressItem(player, cmd, throwdir);
} }
@ -1178,7 +1178,7 @@ static void K_BotItemJawz(const player_t *player, ticcmd_t *cmd)
cmd->buttons |= BT_LOOKBACK; cmd->buttons |= BT_LOOKBACK;
} }
if (player->botvars.itemconfirm > 25*TICRATE) if (player->botvars.itemconfirm > 10*TICRATE)
{ {
K_BotGenericPressItem(player, cmd, throwdir); K_BotGenericPressItem(player, cmd, throwdir);
} }
@ -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.