diff --git a/src/k_botitem.c b/src/k_botitem.c index c4ecc4af3..8758db8dc 100644 --- a/src/k_botitem.c +++ b/src/k_botitem.c @@ -1638,6 +1638,15 @@ void K_BotPickItemPriority(player_t *player) continue; } + if (priority == BOT_ITEM_PR_RINGDEBT) + { + if (player->rings > 0) + { + // Only consider this priority when in ring debt. + continue; + } + } + player->botvars.roulettePriority = max( player->botvars.roulettePriority, priority ); } diff --git a/src/k_roulette.c b/src/k_roulette.c index db97e1695..afb9ef519 100644 --- a/src/k_roulette.c +++ b/src/k_roulette.c @@ -263,13 +263,15 @@ boolean K_ItemSingularity(kartitems_t item) } /*-------------------------------------------------- - botItemPriority_e K_GetBotItemPriority(kartitems_t type) + botItemPriority_e K_GetBotItemPriority(kartitems_t result) See header file for description. --------------------------------------------------*/ -botItemPriority_e K_GetBotItemPriority(kartitems_t type) +botItemPriority_e K_GetBotItemPriority(kartitems_t result) { - switch (type) + result = K_ItemResultToType(result); + + switch (result) { case KITEM_SPB: { diff --git a/src/k_roulette.h b/src/k_roulette.h index f31345e8f..61624525d 100644 --- a/src/k_roulette.h +++ b/src/k_roulette.h @@ -58,20 +58,20 @@ boolean K_ItemSingularity(kartitems_t item); /*-------------------------------------------------- - botItemPriority_e K_GetBotItemPriority(kartitems_t type) + botItemPriority_e K_GetBotItemPriority(kartitems_t result) Returns an item's priority value, which bots use to determine what kind of item they want when the roulette is started. Input Arguments:- - item - The item to check. + result - The item result type to check. Return:- The item's priority type. --------------------------------------------------*/ -botItemPriority_e K_GetBotItemPriority(kartitems_t type); +botItemPriority_e K_GetBotItemPriority(kartitems_t result); /*--------------------------------------------------