mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Merge branch 'bots-flame-shield' into 'master'
Fix bot Flame Shield See merge request KartKrew/Kart!1775
This commit is contained in:
commit
94b2711e30
3 changed files with 72 additions and 8 deletions
|
|
@ -1930,9 +1930,16 @@ void K_UpdateBotGameplayVars(player_t *player)
|
|||
player->botvars.spindashconfirm = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (player->cmd.bot.spindashconfirm < 0 && abs(player->cmd.bot.spindashconfirm) > player->botvars.spindashconfirm)
|
||||
{
|
||||
player->botvars.spindashconfirm = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
player->botvars.spindashconfirm += player->cmd.bot.spindashconfirm;
|
||||
}
|
||||
}
|
||||
|
||||
if (K_TryRingShooter(player) == true)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1812,14 +1812,72 @@ void K_UpdateBotGameplayVarsItemUsage(player_t *player)
|
|||
return;
|
||||
}
|
||||
|
||||
if (player->cmd.bot.itemconfirm < 0 && abs(player->cmd.bot.itemconfirm) > player->botvars.itemconfirm)
|
||||
{
|
||||
player->botvars.itemconfirm = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
player->botvars.itemconfirm += player->cmd.bot.itemconfirm;
|
||||
}
|
||||
|
||||
if (player->itemflags & IF_USERINGS)
|
||||
{
|
||||
;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (player->itemRoulette.active == true)
|
||||
{
|
||||
// Mashing behaviors
|
||||
K_UpdateBotGameplayVarsItemUsageMash(player);
|
||||
return;
|
||||
}
|
||||
|
||||
if (player->stealingtimer == 0)
|
||||
{
|
||||
if (player->eggmanexplode)
|
||||
{
|
||||
;
|
||||
}
|
||||
else if (player->itemflags & IF_EGGMANOUT)
|
||||
{
|
||||
;
|
||||
}
|
||||
else if (player->rocketsneakertimer > 0)
|
||||
{
|
||||
;
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (player->itemtype)
|
||||
{
|
||||
default:
|
||||
{
|
||||
break;
|
||||
}
|
||||
case KITEM_FLAMESHIELD:
|
||||
{
|
||||
if (player->botvars.itemconfirm == 0
|
||||
&& (player->itemflags & IF_HOLDREADY) == IF_HOLDREADY)
|
||||
{
|
||||
INT32 flamemax = player->flamelength;
|
||||
|
||||
if (player->flamemeter < flamemax || flamemax == 0)
|
||||
{
|
||||
;
|
||||
}
|
||||
else
|
||||
{
|
||||
player->botvars.itemconfirm = (3 * flamemax / 4) + (TICRATE / 2);
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*--------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -12288,7 +12288,6 @@ void K_MoveKartPlayer(player_t *player, boolean onground)
|
|||
else
|
||||
{
|
||||
player->itemflags |= IF_HOLDREADY;
|
||||
player->botvars.itemconfirm = 3*flamemax/4;
|
||||
|
||||
if (!(gametyperules & GTR_CLOSERPLAYERS) || leveltime % 6 == 0)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue