mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-26 20:11:47 +00:00
Bots: Fix a couple bugs with item priority
- Fix Ring Debt priorities being used even when not at 0 rings - Fix extra item results not being considered for priorities.
This commit is contained in:
parent
7d7875d7be
commit
69181e4ff2
3 changed files with 17 additions and 6 deletions
|
|
@ -1638,6 +1638,15 @@ void K_BotPickItemPriority(player_t *player)
|
||||||
continue;
|
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 );
|
player->botvars.roulettePriority = max( player->botvars.roulettePriority, priority );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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.
|
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:
|
case KITEM_SPB:
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -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
|
Returns an item's priority value, which
|
||||||
bots use to determine what kind of item they
|
bots use to determine what kind of item they
|
||||||
want when the roulette is started.
|
want when the roulette is started.
|
||||||
|
|
||||||
Input Arguments:-
|
Input Arguments:-
|
||||||
item - The item to check.
|
result - The item result type to check.
|
||||||
|
|
||||||
Return:-
|
Return:-
|
||||||
The item's priority type.
|
The item's priority type.
|
||||||
--------------------------------------------------*/
|
--------------------------------------------------*/
|
||||||
|
|
||||||
botItemPriority_e K_GetBotItemPriority(kartitems_t type);
|
botItemPriority_e K_GetBotItemPriority(kartitems_t result);
|
||||||
|
|
||||||
|
|
||||||
/*--------------------------------------------------
|
/*--------------------------------------------------
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue